(ctx context.Context, url string)
| 289 | }) |
| 290 | |
| 291 | func withImageConfig(ctx context.Context, url string) context.Context { |
| 292 | // Internally, ValidateImage strips off the tag from the image reference and |
| 293 | // leaves just the digest. Do the same here so mock matching works. |
| 294 | refWithTag, err := ParseAndResolve(ctx, url) |
| 295 | if err != nil { |
| 296 | panic(err) |
| 297 | } |
| 298 | refWithTag.Tag = "" |
| 299 | resolved := refWithTag.String() |
| 300 | |
| 301 | return fake.WithTestImageConfig(ctx, resolved) |
| 302 | } |
| 303 | |
| 304 | type mockEvaluator struct { |
| 305 | mock.Mock |
no test coverage detected