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

Function TestFileSource

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

Source from the content-addressed store, hash-verified

191}
192
193func TestFileSource(t *testing.T) {
194 dir := t.TempDir()
195 defer os.RemoveAll(dir)
196 certPEM, keyPEM := makePEM("localhost", time.Minute)
197 certFile, keyFile := saveCert(dir, "localhost", certPEM, keyPEM)
198 testSource(t, FileSource{CertFile: certFile, KeyFile: keyFile}, makeCertPool(certPEM), 0)
199}
200
201func TestPathSource(t *testing.T) {
202 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