Commit 6d8a112a authored by Sharif Elgamal's avatar Sharif Elgamal

don\'t return that the machine doesn\'t exist if the k8s is stopped

parent c1a3e434
......@@ -201,7 +201,7 @@ func adjustGuestClock(h hostRunner, t time.Time) error {
func machineExists(d string, s state.State, err error) (bool, error) {
switch d {
case driver.HyperKit:
if s == state.Stopped || err.Error() == "connection is shut down" {
if s == state.None || (err != nil && err.Error() == "connection is shut down") {
return false, ErrorMachineNotExist
}
return true, err
......@@ -211,17 +211,17 @@ func machineExists(d string, s state.State, err error) (bool, error) {
}
return true, err
case driver.KVM2:
if s == state.None || s == state.Stopped {
if s == state.None {
return false, ErrorMachineNotExist
}
return true, err
case driver.None:
if s == state.Stopped {
if s == state.None {
return false, ErrorMachineNotExist
}
return true, err
case driver.Parallels:
if err.Error() == "machine does not exist" {
if err != nil && err.Error() == "machine does not exist" {
return false, ErrorMachineNotExist
}
return true, err
......@@ -231,12 +231,12 @@ func machineExists(d string, s state.State, err error) (bool, error) {
}
return true, err
case driver.VMware:
if s == state.None || s == state.Stopped {
if s == state.None {
return false, ErrorMachineNotExist
}
return true, err
case driver.VMwareFusion:
if s == state.Stopped {
if s == state.None {
return false, ErrorMachineNotExist
}
return true, err
......
......@@ -37,9 +37,9 @@ import (
pkgutil "k8s.io/minikube/pkg/util"
)
// TestVersionUpgrade downloads latest version of minikube and runs with
// the odlest supported k8s version and then runs the current head minikube
// and it tries to upgrade from the older supported k8s to news supported k8s
// TestVersionUpgrade downloads the latest version of minikube and runs with
// the oldest supported k8s version and then runs the current head minikube
// and tries to upgrade from the oldest supported k8s to newest supported k8s
func TestVersionUpgrade(t *testing.T) {
MaybeParallel(t)
profile := UniqueProfileName("vupgrade")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment