MCPcopy
hub / github.com/fabiolb/fabio / TestStaticSource

Function TestStaticSource

cert/source_test.go:184–191  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

182}
183
184func TestStaticSource(t *testing.T) {
185 certPEM, keyPEM := makePEM("localhost", time.Minute)
186 cert, err := tls.X509KeyPair(certPEM, keyPEM)
187 if err != nil {
188 t.Fatalf("X509KeyPair: got %s want nil", err)
189 }
190 testSource(t, StaticSource{cert, nil}, makeCertPool(certPEM), 0)
191}
192
193func TestFileSource(t *testing.T) {
194 dir := t.TempDir()

Callers

nothing calls this directly

Calls 3

makePEMFunction · 0.85
testSourceFunction · 0.85
makeCertPoolFunction · 0.85

Tested by

no test coverage detected