Skip to content

Commit c5b5c2a

Browse files
committed
chore: set TF_LOG=debug, always pull :latest envbuilder image
1 parent 88ad94f commit c5b5c2a

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

.github/workflows/test.yml

+1
Original file line numberDiff line numberDiff line change
@@ -85,5 +85,6 @@ jobs:
8585
- run: make test-registry
8686
- env:
8787
TF_ACC: "1"
88+
TF_LOG: "debug"
8889
run: go test -v -cover ./internal/provider/
8990
timeout-minutes: 10

internal/provider/provider_test.go

+5-2
Original file line numberDiff line numberDiff line change
@@ -151,12 +151,15 @@ func ensureImage(ctx context.Context, t testing.TB, cli *client.Client, ref stri
151151
images, err := cli.ImageList(ctx, image.ListOptions{})
152152
require.NoError(t, err, "list images")
153153
for _, img := range images {
154-
if slices.Contains(img.RepoTags, ref) {
154+
if strings.HasSuffix(ref, ":latest") {
155+
t.Logf("always pull latest")
156+
break
157+
} else if slices.Contains(img.RepoTags, ref) {
155158
t.Logf("image %q found locally, not pulling", ref)
156159
return
157160
}
158161
}
159-
t.Logf("image %s not found locally, attempting to pull", ref)
162+
t.Logf("attempting to pull image %q", ref)
160163
resp, err := cli.ImagePull(ctx, ref, image.PullOptions{})
161164
require.NoError(t, err)
162165
_, err = io.ReadAll(resp)

0 commit comments

Comments
 (0)