Skip to content

Commit

Permalink
Merge pull request #26 from stacklok/fix-containers-replace
Browse files Browse the repository at this point in the history
Fix replacer tests
  • Loading branch information
JAORMX authored Nov 30, 2023
2 parents dd94541 + dc9c79b commit 48bc4cb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pkg/containers/containers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func TestGetDigest(t *testing.T) {
t.Run(tt.name, func(t *testing.T) {
t.Parallel()

ctx, cancel := context.WithTimeout(context.Background(), 2*time.Second)
ctx, cancel := context.WithTimeout(context.Background(), 1*time.Second)
defer cancel()
got, err := GetDigest(ctx, tt.args.refstr)
if tt.wantErr {
Expand Down
8 changes: 4 additions & 4 deletions pkg/containers/replace_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,17 @@ func TestReplaceImageReference(t *testing.T) {
version: v1
services:
- name: web
image: nginx:latest
image: nginx:1.25.3
- name: localstack
image: localstack/localstack
image: localstack/localstack:3.0.2
`,
expectedOutput: `
version: v1
services:
- name: web
image: index.docker.io/library/nginx@sha256:10d1f5b58f74683ad34eb29287e07dab1e90f10af243f151bb50aa5dbb4d62ee # latest
image: index.docker.io/library/nginx@sha256:10d1f5b58f74683ad34eb29287e07dab1e90f10af243f151bb50aa5dbb4d62ee # 1.25.3
- name: localstack
image: index.docker.io/localstack/localstack@sha256:9b89e7d3bd1b0869f58d9aff0bfad30b4e1c2491ece7a00fb0a7515530d69cf2 # latest
image: index.docker.io/localstack/localstack@sha256:e606c4421419030b12d63a59f1211f57f5b0fbf7e9ce769e6250ee62ff4f9293 # 3.0.2
`,
modified: true,
},
Expand Down

0 comments on commit 48bc4cb

Please sign in to comment.