Skip to content

Commit a1e9969

Browse files
committed
Fail tests if test env version check fails
Signed-off-by: Stefan Büringer [email protected]
1 parent 58557b7 commit a1e9969

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/test/envtest/environment.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,11 +143,11 @@ func Run(ctx context.Context, input RunInput) int {
143143

144144
if input.MinK8sVersion != "" {
145145
if err := version.CheckKubernetesVersion(env.Config, input.MinK8sVersion); err != nil {
146-
fmt.Printf("[IMPORTANT] skipping tests after failing version check: %v\n", err)
146+
fmt.Printf("[ERROR] Cannot run tests after failing version check: %v\n", err)
147147
if err := env.stop(); err != nil {
148148
fmt.Println("[WARNING] Failed to stop the test environment")
149149
}
150-
return 0
150+
return 1
151151
}
152152
}
153153

0 commit comments

Comments
 (0)