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

Function TestPathSource

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

Source from the content-addressed store, hash-verified

199}
200
201func TestPathSource(t *testing.T) {
202 dir := t.TempDir()
203 defer os.RemoveAll(dir)
204 certPEM, keyPEM := makePEM("localhost", time.Minute)
205 saveCert(dir, "localhost", certPEM, keyPEM)
206 testSource(t, PathSource{CertPath: dir}, makeCertPool(certPEM), 10*time.Millisecond)
207}
208
209func TestHTTPSource(t *testing.T) {
210 dir := t.TempDir()

Callers

nothing calls this directly

Calls 4

makePEMFunction · 0.85
saveCertFunction · 0.85
testSourceFunction · 0.85
makeCertPoolFunction · 0.85

Tested by

no test coverage detected