-
Notifications
You must be signed in to change notification settings - Fork 632
pull the image with the <image>@<digest> format #4256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1468,17 +1468,9 @@ func TestDigestResolved(t *testing.T) { | |
t.Run("digest not resolved if it is not populated", func(t *testing.T) { | ||
assert.False(t, (&Container{}).DigestResolved()) | ||
}) | ||
} | ||
|
||
func TestDigestResolutionRequired(t *testing.T) { | ||
t.Run("never required for internal containers", func(t *testing.T) { | ||
assert.False(t, (&Container{Type: ContainerServiceConnectRelay}).DigestResolutionRequired()) | ||
}) | ||
t.Run("required if not found in image reference", func(t *testing.T) { | ||
assert.True(t, (&Container{Image: "alpine"}).DigestResolutionRequired()) | ||
}) | ||
t.Run("not required if found in image reference", func(t *testing.T) { | ||
t.Run("never resolved for container if digest found in image reference", func(t *testing.T) { | ||
image := "ubuntu@sha256:ed6d2c43c8fbcd3eaa44c9dab6d94cb346234476230dc1681227aa72d07181ee" | ||
assert.False(t, (&Container{Image: image}).DigestResolutionRequired()) | ||
imageDigest := "sha256:ed6d2c43c8fbcd3eaa44c9dab6d94cb346234476230dc1681227aa72d07181ee" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Referencing to the previous comment, can there be case where we have image but not imageDigest? What should be the expected behavior in that case? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (non blocking) nit: we may consider adding unit test case for the above |
||
assert.False(t, (&Container{Image: image, ImageDigest: imageDigest}).DigestResolved()) | ||
}) | ||
} |
Uh oh!
There was an error while loading. Please reload this page.