new flag for integration tests timeout-multiplier
parent
2da158a1a0
commit
a100eaef89
|
@ -82,7 +82,7 @@ jobs:
|
||||||
chmod a+x e2e-*
|
chmod a+x e2e-*
|
||||||
chmod a+x minikube-*
|
chmod a+x minikube-*
|
||||||
START_TIME=$(date -u +%s)
|
START_TIME=$(date -u +%s)
|
||||||
KUBECONFIG=$(pwd)/testhome/kubeconfig MINIKUBE_HOME=$(pwd)/testhome ./e2e-linux-amd64 -minikube-start-args=--vm-driver=docker -expected-default-driver= -test.timeout=70m -test.v -slow-machine=true -binary=./minikube-linux-amd64 2>&1 | tee ./report/testout.txt
|
KUBECONFIG=$(pwd)/testhome/kubeconfig MINIKUBE_HOME=$(pwd)/testhome ./e2e-linux-amd64 -minikube-start-args=--vm-driver=docker -expected-default-driver= -test.timeout=70m -test.v -timeout-multiplier=3 -binary=./minikube-linux-amd64 2>&1 | tee ./report/testout.txt
|
||||||
END_TIME=$(date -u +%s)
|
END_TIME=$(date -u +%s)
|
||||||
TIME_ELAPSED=$(($END_TIME-$START_TIME))
|
TIME_ELAPSED=$(($END_TIME-$START_TIME))
|
||||||
min=$((${TIME_ELAPSED}/60))
|
min=$((${TIME_ELAPSED}/60))
|
||||||
|
@ -144,7 +144,7 @@ jobs:
|
||||||
chmod a+x e2e-*
|
chmod a+x e2e-*
|
||||||
chmod a+x minikube-*
|
chmod a+x minikube-*
|
||||||
START_TIME=$(date -u +%s)
|
START_TIME=$(date -u +%s)
|
||||||
KUBECONFIG=$(pwd)/testhome/kubeconfig MINIKUBE_HOME=$(pwd)/testhome ./e2e-linux-amd64 -minikube-start-args=--vm-driver=docker -expected-default-driver= -test.timeout=70m -test.v -slow-machine=true -binary=./minikube-linux-amd64 2>&1 | tee ./report/testout.txt
|
KUBECONFIG=$(pwd)/testhome/kubeconfig MINIKUBE_HOME=$(pwd)/testhome ./e2e-linux-amd64 -minikube-start-args=--vm-driver=docker -expected-default-driver= -test.timeout=70m -test.v -timeout-multiplier=3 -binary=./minikube-linux-amd64 2>&1 | tee ./report/testout.txt
|
||||||
END_TIME=$(date -u +%s)
|
END_TIME=$(date -u +%s)
|
||||||
TIME_ELAPSED=$(($END_TIME-$START_TIME))
|
TIME_ELAPSED=$(($END_TIME-$START_TIME))
|
||||||
min=$((${TIME_ELAPSED}/60))
|
min=$((${TIME_ELAPSED}/60))
|
||||||
|
@ -206,7 +206,7 @@ jobs:
|
||||||
chmod a+x e2e-*
|
chmod a+x e2e-*
|
||||||
chmod a+x minikube-*
|
chmod a+x minikube-*
|
||||||
START_TIME=$(date -u +%s)
|
START_TIME=$(date -u +%s)
|
||||||
KUBECONFIG=$(pwd)/testhome/kubeconfig MINIKUBE_HOME=$(pwd)/testhome ./e2e-linux-amd64 -minikube-start-args=--vm-driver=docker -expected-default-driver= -test.timeout=70m -test.v -slow-machine=true -binary=./minikube-linux-amd64 2>&1 | tee ./report/testout.txt
|
KUBECONFIG=$(pwd)/testhome/kubeconfig MINIKUBE_HOME=$(pwd)/testhome ./e2e-linux-amd64 -minikube-start-args=--vm-driver=docker -expected-default-driver= -test.timeout=70m -test.v -timeout-multiplier=3 -binary=./minikube-linux-amd64 2>&1 | tee ./report/testout.txt
|
||||||
END_TIME=$(date -u +%s)
|
END_TIME=$(date -u +%s)
|
||||||
TIME_ELAPSED=$(($END_TIME-$START_TIME))
|
TIME_ELAPSED=$(($END_TIME-$START_TIME))
|
||||||
min=$((${TIME_ELAPSED}/60))
|
min=$((${TIME_ELAPSED}/60))
|
||||||
|
@ -268,7 +268,7 @@ jobs:
|
||||||
chmod a+x e2e-*
|
chmod a+x e2e-*
|
||||||
chmod a+x minikube-*
|
chmod a+x minikube-*
|
||||||
START_TIME=$(date -u +%s)
|
START_TIME=$(date -u +%s)
|
||||||
KUBECONFIG=$(pwd)/testhome/kubeconfig MINIKUBE_HOME=$(pwd)/testhome ./e2e-linux-amd64 -minikube-start-args=--vm-driver=docker -expected-default-driver= -test.timeout=70m -test.v -slow-machine=true -binary=./minikube-linux-amd64 2>&1 | tee ./report/testout.txt
|
KUBECONFIG=$(pwd)/testhome/kubeconfig MINIKUBE_HOME=$(pwd)/testhome ./e2e-linux-amd64 -minikube-start-args=--vm-driver=docker -expected-default-driver= -test.timeout=70m -test.v -timeout-multiplier=3 -binary=./minikube-linux-amd64 2>&1 | tee ./report/testout.txt
|
||||||
END_TIME=$(date -u +%s)
|
END_TIME=$(date -u +%s)
|
||||||
TIME_ELAPSED=$(($END_TIME-$START_TIME))
|
TIME_ELAPSED=$(($END_TIME-$START_TIME))
|
||||||
min=$((${TIME_ELAPSED}/60))
|
min=$((${TIME_ELAPSED}/60))
|
||||||
|
@ -341,7 +341,7 @@ jobs:
|
||||||
chmod a+x e2e-*
|
chmod a+x e2e-*
|
||||||
chmod a+x minikube-*
|
chmod a+x minikube-*
|
||||||
START_TIME=$(date -u +%s)
|
START_TIME=$(date -u +%s)
|
||||||
KUBECONFIG=$(pwd)/testhome/kubeconfig MINIKUBE_HOME=$(pwd)/testhome ./e2e-linux-amd64 -minikube-start-args=--vm-driver=docker -expected-default-driver= -test.timeout=70m -test.v -slow-machine=true -binary=./minikube-linux-amd64 2>&1 | tee ./report/testout.txt
|
KUBECONFIG=$(pwd)/testhome/kubeconfig MINIKUBE_HOME=$(pwd)/testhome ./e2e-linux-amd64 -minikube-start-args=--vm-driver=docker -expected-default-driver= -test.timeout=70m -test.v -timeout-multiplier=3 -binary=./minikube-linux-amd64 2>&1 | tee ./report/testout.txt
|
||||||
END_TIME=$(date -u +%s)
|
END_TIME=$(date -u +%s)
|
||||||
TIME_ELAPSED=$(($END_TIME-$START_TIME))
|
TIME_ELAPSED=$(($END_TIME-$START_TIME))
|
||||||
min=$((${TIME_ELAPSED}/60))
|
min=$((${TIME_ELAPSED}/60))
|
||||||
|
|
|
@ -34,7 +34,7 @@ var forceProfile = flag.String("profile", "", "force tests to run against a part
|
||||||
var cleanup = flag.Bool("cleanup", true, "cleanup failed test run")
|
var cleanup = flag.Bool("cleanup", true, "cleanup failed test run")
|
||||||
var enableGvisor = flag.Bool("gvisor", false, "run gvisor integration test (slow)")
|
var enableGvisor = flag.Bool("gvisor", false, "run gvisor integration test (slow)")
|
||||||
var postMortemLogs = flag.Bool("postmortem-logs", true, "show logs after a failed test run")
|
var postMortemLogs = flag.Bool("postmortem-logs", true, "show logs after a failed test run")
|
||||||
var slowMachine = flag.Bool("slow-machine", false, "double the timeout for tests to finish")
|
var timeOutMultiplier = flag.Float64("timeout-multiplier", 1, "multiply the timeout for the tests")
|
||||||
|
|
||||||
// Paths to files - normally set for CI
|
// Paths to files - normally set for CI
|
||||||
var binaryPath = flag.String("binary", "../../out/minikube", "path to minikube binary")
|
var binaryPath = flag.String("binary", "../../out/minikube", "path to minikube binary")
|
||||||
|
@ -81,16 +81,10 @@ func CanCleanup() bool {
|
||||||
|
|
||||||
// Minutes will return timeout in minutes based on how slow the machine is
|
// Minutes will return timeout in minutes based on how slow the machine is
|
||||||
func Minutes(n int) time.Duration {
|
func Minutes(n int) time.Duration {
|
||||||
if *slowMachine { // double time out for slow machines
|
return time.Duration(*timeOutMultiplier) * time.Duration(n) * time.Minute
|
||||||
return time.Duration(2) * time.Duration(n) * time.Minute
|
|
||||||
}
|
|
||||||
return time.Duration(n) * time.Minute
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Seconds will return timeout in minutes based on how slow the machine is
|
// Seconds will return timeout in minutes based on how slow the machine is
|
||||||
func Seconds(n int) time.Duration {
|
func Seconds(n int) time.Duration {
|
||||||
if *slowMachine { // double time out for slow machines
|
return time.Duration(*timeOutMultiplier) * time.Duration(n) * time.Second
|
||||||
return time.Duration(3) * time.Duration(n) * time.Second
|
|
||||||
}
|
|
||||||
return time.Duration(n) * time.Second
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue