diff --git a/hack/jenkins/common.sh b/hack/jenkins/common.sh index 4512a83b6f07..7b0ebabcc41a 100755 --- a/hack/jenkins/common.sh +++ b/hack/jenkins/common.sh @@ -91,7 +91,7 @@ fi # Build the gvisor image and store it as a tarball. This will be copied into minikube and loaded by ctr. docker build -t gcr.io/k8s-minikube/gvisor-addon:latest -f testdata/gvisor-addon-Dockerfile out -docker save gcr.io/k8s-minikube/gvisor-addon:latest > out/gvisor-image.tar +docker save gcr.io/k8s-minikube/gvisor-addon:latest > ${MINIKUBE_HOME}/gvisor-image.tar # Cleanup stale test outputs. echo "" diff --git a/test/integration/functional_test.go b/test/integration/functional_test.go index 080e7e63dcbc..78f79b4744cb 100644 --- a/test/integration/functional_test.go +++ b/test/integration/functional_test.go @@ -20,7 +20,6 @@ package integration import ( "fmt" - "os/exec" "strings" "testing" @@ -73,18 +72,8 @@ func TestFunctionalContainerd(t *testing.T) { } func loadGvisorImage(t *testing.T, m util.MinikubeRunner) { - localGvisorTarPath := "out/gvisor-image.tar" - minikubeGvisorTarPath := "/tmp/gvisor-image.tar" - // First, copy this tar into minikube. - cmd := exec.Command("sh", "-c", fmt.Sprintf("scp -i $(minikube ssh-key) %s docker@$(minikube ip):%s", localGvisorTarPath, minikubeGvisorTarPath)) - output, err := cmd.CombinedOutput() - if err != nil { - pwd := exec.Command("pwd") - o, _ := pwd.CombinedOutput() - t.Logf("pwd: %s", string(o)) - t.Fatalf("error building gvisor addon image: %v \n %s", err, string(output)) - } - // Then, load the tar into the containerd daemon. + minikubeGvisorTarPath := "/gvisor-image.tar" + // Load the gvisor tar into the containerd daemon. out, err := m.SSH(fmt.Sprintf("sudo ctr cri load %s", minikubeGvisorTarPath)) if err != nil { t.Fatalf("error loading gvisor addon image: %v \n %s", err, out)