Skip to content

Commit

Permalink
Catch the exit signal and try to cleanup (#53)
Browse files Browse the repository at this point in the history
  • Loading branch information
ktsakalozos authored Dec 1, 2022
1 parent 8a8b424 commit f7cc920
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions integration/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,25 @@ import (
"fmt"
"os"
"os/exec"
"os/signal"
"strings"
"syscall"
"testing"
"time"
)

const KUBECONFIG string = "/var/tmp/kubeconfig.e2e.conf"

func init() {
s := make(chan os.Signal, 1)
signal.Notify(s, syscall.SIGTERM, syscall.SIGINT)
go func() {
<-s
teardownCluster()
os.Exit(1)
}()
}

// TestBasic waits for the target cluster to deploy and start a 30 pod deployment.
// The CLUSTER_MANIFEST_FILE environment variable should point to a manifest with the target cluster
// kubectl and clusterctl have to be avaibale in the caller's path.
Expand Down

0 comments on commit f7cc920

Please sign in to comment.