Skip to content

Commit

Permalink
test: fix docker test
Browse files Browse the repository at this point in the history
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
  • Loading branch information
caarlos0 committed Nov 17, 2022
1 parent bb1fb9a commit 8ef1d43
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions internal/pipe/docker/docker_test.go
Expand Up @@ -1427,25 +1427,26 @@ func TestSkip(t *testing.T) {
func TestWithDigest(t *testing.T) {
artifacts := artifact.New()
artifacts.Add(&artifact.Artifact{
Name: "owner/img:t1",
Name: "localhost:5050/owner/img:t1",
Type: artifact.DockerImage,
Extra: artifact.Extras{
artifact.ExtraDigest: "sha256:d1",
},
})
artifacts.Add(&artifact.Artifact{
Name: "owner/img:t2",
Name: "localhost:5050/owner/img:t2",
Type: artifact.DockerImage,
Extra: artifact.Extras{
artifact.ExtraDigest: "sha256:d2",
},
})
artifacts.Add(&artifact.Artifact{
Name: "owner/img:t3",
Name: "localhost:5050/owner/img:t3",
Type: artifact.DockerImage,
})

for _, use := range []string{useDocker, useBuildx} {
use := use
t.Run(use, func(t *testing.T) {
t.Run("good", func(t *testing.T) {
require.Equal(t, "localhost:5050/owner/img:t1@sha256:d1", withDigest(use, "localhost:5050/owner/img:t1", artifacts.List()))
Expand Down

0 comments on commit 8ef1d43

Please sign in to comment.