MCPcopy Create free account
hub / github.com/conforma/cli / withImageConfig

Function withImageConfig

internal/image/validate_test.go:291–302  ·  view source on GitHub ↗
(ctx context.Context, url string)

Source from the content-addressed store, hash-verified

289})
290
291func 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
304type mockEvaluator struct {
305 mock.Mock

Callers 3

TestBuiltinChecksFunction · 0.85

Calls 3

WithTestImageConfigFunction · 0.92
ParseAndResolveFunction · 0.85
StringMethod · 0.45

Tested by

no test coverage detected