From af16d336daab4fc2c77d3b4ee7f34b4cc5de54ca Mon Sep 17 00:00:00 2001 From: Medya Gh Date: Sun, 18 Aug 2019 01:39:42 -0700 Subject: [PATCH] Fixed givsor test setup and added time out to integration test --- hack/jenkins/common.sh | 5 +++++ test/integration/flags.go | 7 ++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/hack/jenkins/common.sh b/hack/jenkins/common.sh index 8e0c7c0b2a..8e4efb7e32 100755 --- a/hack/jenkins/common.sh +++ b/hack/jenkins/common.sh @@ -241,6 +241,11 @@ export MINIKUBE_HOME="${TEST_HOME}/.minikube" export MINIKUBE_WANTREPORTERRORPROMPT=False export KUBECONFIG="${TEST_HOME}/kubeconfig" +# Build the gvisor image. This will be copied into minikube and loaded by ctr. +# Used by TestContainerd for Gvisor Test. +docker build -t gcr.io/k8s-minikube/gvisor-addon:latest -f testdata/gvisor-addon-Dockerfile out + + # Display the default image URL echo "" echo ">> ISO URL" diff --git a/test/integration/flags.go b/test/integration/flags.go index f8ad39211e..f58019534a 100644 --- a/test/integration/flags.go +++ b/test/integration/flags.go @@ -18,6 +18,7 @@ package integration import ( "flag" + "fmt" "os" "strings" "testing" @@ -32,7 +33,7 @@ func TestMain(m *testing.M) { os.Exit(m.Run()) } -var startTimeout = flag.Int("timeout", 25, "number of minutes to wait for minikube start") +var startTimeout = flag.Duration("timeout", 25*time.Minute, "max duration to wait for a full minikube start") var binaryPath = flag.String("binary", "../../out/minikube", "path to minikube binary") var globalArgs = flag.String("minikube-args", "", "Arguments to pass to minikube") var startArgs = flag.String("minikube-start-args", "", "Arguments to pass to minikube start") @@ -45,10 +46,10 @@ func NewMinikubeRunner(t *testing.T, profile string, extraStartArgs ...string) u return util.MinikubeRunner{ Profile: profile, BinaryPath: *binaryPath, - StartArgs: *startArgs + " " + strings.Join(extraStartArgs, " "), + StartArgs: *startArgs + fmt.Sprintf(" --wait-timeout=%s ", *startTimeout/2) + strings.Join(extraStartArgs, " "), // adding timeout per component GlobalArgs: *globalArgs, MountArgs: *mountArgs, - TimeOutStart: time.Duration(*startTimeout) * time.Minute, + TimeOutStart: *startTimeout, // timeout for all start T: t, } }