Skip to content

Commit 25eb453

Browse files
committed
fix ha test
1 parent 87eddd3 commit 25eb453

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

cmd/installer/cli/reset.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ func ResetCmd(ctx context.Context, name string) *cobra.Command {
8080
// populate options struct with host information
8181
currentHost, err := newHostInfo(ctx)
8282
if !checkErrPrompt(assumeYes, force, err) {
83-
return fmt.Errorf("Aborting")
83+
return err
8484
}
8585

8686
logrus.Info("")

pkg/addons/highavailability.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@ func CanEnableHA(ctx context.Context, kcli client.Client) (bool, string, error)
4141
return false, "", errors.Wrap(err, "get restore state configmap")
4242
}
4343

44-
ncps, err := kubeutils.NumOfControlPlaneNodes(ctx, kcli)
44+
numControllerNodes, err := kubeutils.NumOfControlPlaneNodes(ctx, kcli)
4545
if err != nil {
4646
return false, "", errors.Wrap(err, "check control plane nodes")
4747
}
48-
if ncps < 3 {
49-
return false, "number of control plane nodes is less than 3", nil
48+
if numControllerNodes < 3 {
49+
return false, "at least three controller nodes are required", nil
5050
}
5151
return true, "", nil
5252
}

pkg/preflights/run.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,7 @@ func runHostPreflights(ctx context.Context, hpf *v1beta2.HostPreflightSpec, opts
109109
spinner := spinner.Start()
110110

111111
if opts.SkipHostPreflights {
112-
spinner.Infof("Host preflights skipped")
113-
spinner.Close()
112+
spinner.Closef("Host preflights skipped")
114113
return nil
115114
}
116115

0 commit comments

Comments
 (0)