Skip to content

Commit

Permalink
Add check in test-e2e testing to ensure there's a cluster
Browse files Browse the repository at this point in the history
Signed-off-by: Todd Short <[email protected]>
  • Loading branch information
tmshort committed Nov 26, 2024
1 parent adf64a0 commit fa24b24
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/e2e/e2e_suite_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package e2e

import (
"fmt"
"os"
"testing"
"time"

Expand All @@ -24,6 +26,11 @@ var (
)

func TestE2E(t *testing.T) {
_, err := ctrl.GetConfig()
if err != nil {
fmt.Println("Error: Could not get current Kubernetes context. Verify the cluster configuration")
os.Exit(0)
}
RegisterFailHandler(Fail)
SetDefaultEventuallyTimeout(1 * time.Minute)
SetDefaultEventuallyPollingInterval(1 * time.Second)
Expand Down

0 comments on commit fa24b24

Please sign in to comment.