Skip to content

Commit 35b3dbe

Browse files
committed
Show enterprise image being used once
1 parent d3e1feb commit 35b3dbe

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

tests/test_util.go

+8-2
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ import (
2929
"os"
3030
"strconv"
3131
"strings"
32+
"sync"
3233
"testing"
3334
"time"
3435

@@ -54,8 +55,9 @@ const (
5455
)
5556

5657
var (
57-
maskAny = errors.WithStack
58-
syncClientCache client.ClientCache
58+
maskAny = errors.WithStack
59+
syncClientCache client.ClientCache
60+
showEnterpriseImageOnce sync.Once
5961
)
6062

6163
// longOrSkip checks the short test flag.
@@ -73,6 +75,10 @@ func getEnterpriseImageOrSkip(t *testing.T) string {
7375
image := strings.TrimSpace(os.Getenv("ENTERPRISEIMAGE"))
7476
if image == "" {
7577
t.Skip("Skipping test because ENTERPRISEIMAGE is not set")
78+
} else {
79+
showEnterpriseImageOnce.Do(func() {
80+
t.Logf("Using enterprise image: %s", image)
81+
})
7682
}
7783
return image
7884
}

0 commit comments

Comments
 (0)