(t *testing.T)
| 79 | } |
| 80 | |
| 81 | func 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 | |
| 95 | func writeConfig(t *testing.T, dir, file, content string) { |
| 96 | if err := os.MkdirAll(dir, 0777); err != nil { |
nothing calls this directly
no test coverage detected
searching dependent graphs…