From c07c1ba65b1eea87a21951112d36896e3937a5e7 Mon Sep 17 00:00:00 2001 From: lxzhang000 Date: Wed, 10 Feb 2021 20:50:36 +0800 Subject: [PATCH] Updates output string and fixes failed unit test. --- pkg/minikube/driver/driver.go | 2 +- pkg/minikube/registry/global_test.go | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pkg/minikube/driver/driver.go b/pkg/minikube/driver/driver.go index 74fb074fd613..b2c9b944d85b 100644 --- a/pkg/minikube/driver/driver.go +++ b/pkg/minikube/driver/driver.go @@ -280,7 +280,7 @@ func Suggest(options []registry.DriverState) (registry.DriverState, []registry.D } if pick.Name == "" { - ds.Rejection = "Rejected due to low priority" + ds.Rejection = fmt.Sprintf("Not selected: %s must be specified explicitly using --driver", ds.Name) } else { ds.Rejection = fmt.Sprintf("%s is preferred", pick.Name) } diff --git a/pkg/minikube/registry/global_test.go b/pkg/minikube/registry/global_test.go index 2f54373e018f..40e17c7005aa 100644 --- a/pkg/minikube/registry/global_test.go +++ b/pkg/minikube/registry/global_test.go @@ -73,7 +73,7 @@ func TestGlobalAvailable(t *testing.T) { bar := DriverDef{ Name: "healthy-bar", - Priority: Default, + Priority: Preferred, Status: func() State { return State{Healthy: true} }, } if err := Register(bar); err != nil { @@ -82,7 +82,7 @@ func TestGlobalAvailable(t *testing.T) { foo := DriverDef{ Name: "unhealthy-foo", - Priority: Default, + Priority: Fallback, Status: func() State { return State{Healthy: false} }, } if err := Register(foo); err != nil { @@ -92,12 +92,12 @@ func TestGlobalAvailable(t *testing.T) { expected := []DriverState{ { Name: "healthy-bar", - Priority: Default, + Priority: Preferred, State: State{Healthy: true}, }, { Name: "unhealthy-foo", - Priority: Default, + Priority: Fallback, State: State{Healthy: false}, }, }