Remove broken ExpectedDefaultDriver test, fix call to PreloadExists
parent
c42ecf95e0
commit
d75dc6a229
|
@ -286,7 +286,6 @@ fi
|
|||
touch "${TEST_OUT}"
|
||||
${SUDO_PREFIX}${E2E_BIN} \
|
||||
-minikube-start-args="--driver=${VM_DRIVER} ${EXTRA_START_ARGS}" \
|
||||
-expected-default-driver="${EXPECTED_DEFAULT_DRIVER}" \
|
||||
-test.timeout=70m -test.v \
|
||||
${EXTRA_TEST_ARGS} \
|
||||
-binary="${MINIKUBE_BIN}" 2>&1 | tee "${TEST_OUT}"
|
||||
|
|
|
@ -19,7 +19,7 @@ gsutil.cmd -m cp -r gs://minikube-builds/$env:MINIKUBE_LOCATION/testdata .
|
|||
|
||||
./out/minikube-windows-amd64.exe delete
|
||||
|
||||
out/e2e-windows-amd64.exe --expected-default-driver=hyperv -minikube-start-args="--driver=hyperv --hyperv-virtual-switch=primary-virtual-switch" -binary=out/minikube-windows-amd64.exe -test.v -test.timeout=65m
|
||||
out/e2e-windows-amd64.exe -minikube-start-args="--driver=hyperv --hyperv-virtual-switch=primary-virtual-switch" -binary=out/minikube-windows-amd64.exe -test.v -test.timeout=65m
|
||||
$env:result=$lastexitcode
|
||||
# If the last exit code was 0->success, x>0->error
|
||||
If($env:result -eq 0){$env:status="success"}
|
||||
|
|
|
@ -19,7 +19,7 @@ gsutil.cmd -m cp -r gs://minikube-builds/$env:MINIKUBE_LOCATION/testdata .
|
|||
|
||||
./out/minikube-windows-amd64.exe delete
|
||||
|
||||
out/e2e-windows-amd64.exe -minikube-start-args="--driver=virtualbox" -expected-default-driver=hyperv -binary=out/minikube-windows-amd64.exe -test.v -test.timeout=30m
|
||||
out/e2e-windows-amd64.exe -minikube-start-args="--driver=virtualbox" -binary=out/minikube-windows-amd64.exe -test.v -test.timeout=30m
|
||||
$env:result=$lastexitcode
|
||||
# If the last exit code was 0->success, x>0->error
|
||||
If($env:result -eq 0){$env:status="success"}
|
||||
|
|
|
@ -21,7 +21,6 @@ package integration
|
|||
import (
|
||||
"context"
|
||||
"crypto/md5"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
|
@ -33,7 +32,6 @@ import (
|
|||
"time"
|
||||
|
||||
"k8s.io/minikube/pkg/minikube/bootstrapper/images"
|
||||
"k8s.io/minikube/pkg/minikube/config"
|
||||
"k8s.io/minikube/pkg/minikube/constants"
|
||||
"k8s.io/minikube/pkg/minikube/download"
|
||||
"k8s.io/minikube/pkg/minikube/localpath"
|
||||
|
@ -73,7 +71,7 @@ func TestDownloadOnly(t *testing.T) {
|
|||
t.Errorf("%s failed: %v", args, err)
|
||||
}
|
||||
|
||||
if download.PreloadExists(v, "docker") {
|
||||
if download.PreloadExists(v, r) {
|
||||
// Just make sure the tarball path exists
|
||||
if _, err := os.Stat(download.TarballPath(v)); err != nil {
|
||||
t.Errorf("preloaded tarball path doesn't exist: %v", err)
|
||||
|
@ -123,34 +121,6 @@ func TestDownloadOnly(t *testing.T) {
|
|||
})
|
||||
}
|
||||
|
||||
// Check that the profile we've created has the expected driver
|
||||
t.Run("ExpectedDefaultDriver", func(t *testing.T) {
|
||||
if ExpectedDefaultDriver() == "" {
|
||||
t.Skipf("--expected-default-driver is unset, skipping test")
|
||||
return
|
||||
}
|
||||
rr, err := Run(t, exec.CommandContext(ctx, Target(), "profile", "list", "--output", "json"))
|
||||
if err != nil {
|
||||
t.Errorf("%s failed: %v", rr.Args, err)
|
||||
}
|
||||
var ps map[string][]config.Profile
|
||||
err = json.Unmarshal(rr.Stdout.Bytes(), &ps)
|
||||
if err != nil {
|
||||
t.Errorf("%s failed: %v", rr.Args, err)
|
||||
}
|
||||
|
||||
got := ""
|
||||
for _, p := range ps["valid"] {
|
||||
if p.Name == profile {
|
||||
got = p.Config.Driver
|
||||
}
|
||||
}
|
||||
|
||||
if got != ExpectedDefaultDriver() {
|
||||
t.Errorf("got driver %q, expected %q\nstart output: %s", got, ExpectedDefaultDriver(), rrr.Output())
|
||||
}
|
||||
})
|
||||
|
||||
// This is a weird place to test profile deletion, but this test is serial, and we have a profile to delete!
|
||||
t.Run("DeleteAll", func(t *testing.T) {
|
||||
if !CanCleanup() {
|
||||
|
|
|
@ -27,7 +27,6 @@ import (
|
|||
|
||||
// General configuration: used to set the VM Driver
|
||||
var startArgs = flag.String("minikube-start-args", "", "Arguments to pass to minikube start")
|
||||
var defaultDriver = flag.String("expected-default-driver", "", "Expected default driver")
|
||||
|
||||
// Flags for faster local integration testing
|
||||
var forceProfile = flag.String("profile", "", "force tests to run against a particular profile")
|
||||
|
|
Loading…
Reference in New Issue