Merge pull request #10271 from priyawadhwa/containerd-pause-tests

Turn on TestPause for containerd
pull/10329/head
priyawadhwa 2021-02-01 11:28:22 -08:00 committed by GitHub
commit 946d5f5de4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 11 deletions

View File

@ -393,8 +393,8 @@ if grep -q html "$HTML_OUT"; then
fi
echo ">> Cleaning up after ourselves ..."
${SUDO_PREFIX}${MINIKUBE_BIN} tunnel --cleanup || true
${SUDO_PREFIX}${MINIKUBE_BIN} delete --all --purge >/dev/null 2>/dev/null || true
timeout 3m ${SUDO_PREFIX}${MINIKUBE_BIN} tunnel --cleanup || true
timeout 5m ${SUDO_PREFIX}${MINIKUBE_BIN} delete --all --purge >/dev/null 2>/dev/null || true
cleanup_stale_routes || true
${SUDO_PREFIX} rm -Rf "${MINIKUBE_HOME}" || true

View File

@ -169,7 +169,9 @@ func Cleanup(t *testing.T, profile string, cancel context.CancelFunc) {
// No helper because it makes the call log confusing.
if *cleanup {
t.Logf("Cleaning up %q profile ...", profile)
_, err := Run(t, exec.Command(Target(), "delete", "-p", profile))
ctx, cancel := context.WithTimeout(context.Background(), 2*time.Minute)
defer cancel()
_, err := Run(t, exec.CommandContext(ctx, Target(), "delete", "-p", profile))
if err != nil {
t.Logf("failed cleanup: %v", err)
}

View File

@ -152,10 +152,6 @@ func GithubActionRunner() bool {
return os.Getenv("GITHUB_ACTIONS") == "true"
}
func ContainerdContainerRuntime() bool {
return strings.Contains(*startArgs, "--container-runtime=containerd")
}
// arm64Platform returns true if running on arm64/* platform
func arm64Platform() bool {
return runtime.GOARCH == "arm64"

View File

@ -29,14 +29,11 @@ import (
)
func TestPause(t *testing.T) {
if ContainerdContainerRuntime() {
t.Skip("skipping as this test currently times out on containerd")
}
MaybeParallel(t)
type validateFunc func(context.Context, *testing.T, string)
profile := UniqueProfileName("pause")
ctx, cancel := context.WithTimeout(context.Background(), Minutes(30))
ctx, cancel := context.WithTimeout(context.Background(), Minutes(15))
defer Cleanup(t, profile, cancel)
// Serial tests