Skip to content

Commit

Permalink
Updates output string and fixes failed unit test.
Browse files Browse the repository at this point in the history
  • Loading branch information
lxzhang000 committed Feb 10, 2021
1 parent 8620ab6 commit c07c1ba
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pkg/minikube/driver/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
8 changes: 4 additions & 4 deletions pkg/minikube/registry/global_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 {
Expand All @@ -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},
},
}
Expand Down

0 comments on commit c07c1ba

Please sign in to comment.