(t *testing.T)
| 284 | } |
| 285 | |
| 286 | func TestInvalidReferenceComponents(t *testing.T) { |
| 287 | if _, err := ParseNormalizedNamed("-foo"); err == nil { |
| 288 | t.Fatal("Expected WithName to detect invalid name") |
| 289 | } |
| 290 | ref, err := ParseNormalizedNamed("busybox") |
| 291 | if err != nil { |
| 292 | t.Fatal(err) |
| 293 | } |
| 294 | if _, err := WithTag(ref, "-foo"); err == nil { |
| 295 | t.Fatal("Expected WithName to detect invalid tag") |
| 296 | } |
| 297 | if _, err := WithDigest(ref, digest.Digest("foo")); err == nil { |
| 298 | t.Fatal("Expected WithDigest to detect invalid digest") |
| 299 | } |
| 300 | } |
| 301 | |
| 302 | func equalReference(r1, r2 Reference) bool { |
| 303 | switch v1 := r1.(type) { |
nothing calls this directly
no test coverage detected
searching dependent graphs…