MCPcopy
hub / github.com/google/go-containerregistry / TestNoConfig

Function TestNoConfig

pkg/authn/keychain_test.go:81–93  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

79}
80
81func TestNoConfig(t *testing.T) {
82 cd := setupConfigDir(t)
83 defer os.RemoveAll(filepath.Dir(cd))
84
85 auth, err := DefaultKeychain.Resolve(testRegistry)
86 if err != nil {
87 t.Fatalf("Resolve() = %v", err)
88 }
89
90 if auth != Anonymous {
91 t.Errorf("expected Anonymous, got %v", auth)
92 }
93}
94
95func writeConfig(t *testing.T, dir, file, content string) {
96 if err := os.MkdirAll(dir, 0777); err != nil {

Callers

nothing calls this directly

Calls 2

setupConfigDirFunction · 0.85
ResolveMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…