Skip to content

Commit

Permalink
Merge pull request #9388 from sbueringer/pr-fail-on-version-check
Browse files Browse the repository at this point in the history
🌱 Fail tests if test env version check fails
  • Loading branch information
k8s-ci-robot committed Sep 11, 2023
2 parents 826494a + a1e9969 commit 321096f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/test/envtest/environment.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,11 @@ func Run(ctx context.Context, input RunInput) int {

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

Expand Down

0 comments on commit 321096f

Please sign in to comment.