Merge pull request #5783 from tstromberg/gvisor-flag

CI experiment: Move gvisor testing behind a flag, double timeout
pull/5786/head
Thomas Strömberg 2019-10-29 22:07:09 -07:00 committed by GitHub
commit 646180bc19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 1 deletions

View File

@ -262,6 +262,7 @@ ${SUDO_PREFIX}${E2E_BIN} \
-expected-default-driver="${EXPECTED_DEFAULT_DRIVER}" \
-test.timeout=60m \
-test.parallel=${PARALLEL_COUNT} \
${EXTRA_TEST_ARGS} \
-binary="${MINIKUBE_BIN}" && result=$? || result=$?
set +x
echo ">> ${E2E_BIN} exited with ${result} at $(date)"

View File

@ -31,5 +31,8 @@ JOB_NAME="KVM_Linux"
PARALLEL_COUNT=4
EXPECTED_DEFAULT_DRIVER="kvm2"
# We pick kvm as our gvisor testbed because it is fast & reliable
EXTRA_TEST_ARGS="-gvisor"
# Download files and set permissions
source ./common.sh

View File

@ -30,10 +30,14 @@ func TestGvisorAddon(t *testing.T) {
if NoneDriver() {
t.Skip("Can't run containerd backend with none driver")
}
if !*enableGvisor {
t.Skip("skipping test because --gvisor=false")
}
MaybeSlowParallel(t)
profile := UniqueProfileName("gvisor")
ctx, cancel := context.WithTimeout(context.Background(), 30*time.Minute)
ctx, cancel := context.WithTimeout(context.Background(), 60*time.Minute)
defer func() {
if t.Failed() {
rr, err := Run(t, exec.CommandContext(ctx, "kubectl", "--context", profile, "logs", "gvisor", "-n", "kube-system"))

View File

@ -32,6 +32,7 @@ var defaultDriver = flag.String("expected-default-driver", "", "Expected default
// Flags for faster local integration testing
var forceProfile = flag.String("profile", "", "force tests to run against a particular profile")
var cleanup = flag.Bool("cleanup", true, "cleanup failed test run")
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")
// Paths to files - normally set for CI