Fix broken cluster_test

pull/5658/head
tstromberg 2019-10-18 15:48:26 -07:00
parent 440d0e85e6
commit 13cba07ec8
6 changed files with 20 additions and 31 deletions

View File

@ -28,6 +28,9 @@ import (
// Fix for https://github.com/kubernetes/minikube/issues/4866
_ "k8s.io/minikube/pkg/initflag"
// Register drivers
_ "k8s.io/minikube/pkg/minikube/registry/drvs"
mlog "github.com/docker/machine/libmachine/log"
"github.com/golang/glog"

View File

@ -51,7 +51,6 @@ import (
"k8s.io/minikube/pkg/minikube/localpath"
"k8s.io/minikube/pkg/minikube/out"
"k8s.io/minikube/pkg/minikube/registry"
_ "k8s.io/minikube/pkg/minikube/registry/drvs"
pkgutil "k8s.io/minikube/pkg/util"
"k8s.io/minikube/pkg/util/retry"
)

View File

@ -22,6 +22,9 @@ import (
"testing"
"time"
// Register drivers
_ "k8s.io/minikube/pkg/minikube/registry/drvs"
"github.com/docker/machine/libmachine/drivers"
"github.com/docker/machine/libmachine/host"
"github.com/docker/machine/libmachine/provision"

View File

@ -21,6 +21,7 @@ import (
"path/filepath"
"github.com/docker/machine/libmachine/host"
"github.com/golang/glog"
"github.com/pkg/errors"
"k8s.io/minikube/pkg/minikube/localpath"
"k8s.io/minikube/pkg/minikube/machine"
@ -68,6 +69,7 @@ func ListMachines(miniHome ...string) (validMachines []*Machine, inValidMachines
for _, n := range pDirs {
p, err := LoadMachine(n)
if err != nil {
glog.Infof("%s not valid: %v", n, err)
inValidMachines = append(inValidMachines, p)
continue
}

View File

@ -1,30 +0,0 @@
/*
Copyright 2019 The Kubernetes Authors All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package driver
const (
// Driver names
Mock = "mock-driver"
None = "none"
KVM2 = "kvm2"
VirtualBox = "virtualbox"
HyperKit = "hyperkit"
VMware = "vmware"
VMwareFusion = "vmwarefusion"
HyperV = "hyperv"
Parallels = "parallels"
)

View File

@ -21,6 +21,18 @@ import (
"os"
)
const (
Mock = "mock"
None = "none"
KVM2 = "kvm2"
VirtualBox = "virtualbox"
HyperKit = "hyperkit"
VMware = "vmware"
VMwareFusion = "vmwarefusion"
HyperV = "hyperv"
Parallels = "parallels"
)
// SupportedDrivers returns a list of supported drivers
func SupportedDrivers() []string {
return supportedDrivers