Skip to content

Commit

Permalink
chore: rename CheckPaused to VerifyNotPaused
Browse files Browse the repository at this point in the history
  • Loading branch information
norshtein authored and spowelljr committed Jul 12, 2023
1 parent c7ee592 commit 06fb28c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cmd/minikube/cmd/config/disable.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ var addonsDisableCmd = &cobra.Command{
if len(args) != 1 {
exit.Message(reason.Usage, "usage: minikube addons disable ADDON_NAME")
}
err := addons.CheckPaused(ClusterFlagValue(), false)
err := addons.VerifyNotPaused(ClusterFlagValue(), false)
if err != nil {
exit.Error(reason.InternalAddonDisablePaused, "disable failed", err)
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/minikube/cmd/config/enable.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ var addonsEnableCmd = &cobra.Command{
exit.Message(reason.Usage, "You cannot enable addons on a cluster without Kubernetes, to enable Kubernetes on your cluster, run: minikube start --kubernetes-version=stable")
}

err = addons.CheckPaused(ClusterFlagValue(), true)
err = addons.VerifyNotPaused(ClusterFlagValue(), true)
if err != nil {
exit.Error(reason.InternalAddonEnablePaused, "enabled failed", err)
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/addons/addons.go
Original file line number Diff line number Diff line change
Expand Up @@ -588,8 +588,8 @@ func UpdateConfigToDisable(cc *config.ClusterConfig) {
}
}

// CheckPaused checks whether the cluster is paused before enable/disable an addon.
func CheckPaused(profile string, enable bool) error {
// VerifyNotPaused verifies the cluster is not paused before enable/disable an addon.
func VerifyNotPaused(profile string, enable bool) error {
klog.Info("checking whether the cluster is paused")

cc, err := config.Load(profile)
Expand Down

0 comments on commit 06fb28c

Please sign in to comment.