Skip to content

Commit

Permalink
test: Improve cluster deletion defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
hakman committed Jan 8, 2024
1 parent f3c9c05 commit 9bef6ef
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
3 changes: 2 additions & 1 deletion cmd/kops/delete_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,9 @@ type DeleteClusterOptions struct {
}

func (o *DeleteClusterOptions) InitDefaults() {
o.count = 42
o.count = 0
o.interval = 10 * time.Second
o.wait = 10 * time.Minute
}

var (
Expand Down
4 changes: 2 additions & 2 deletions docs/cli/kops_delete_cluster.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 10 additions & 3 deletions tests/e2e/kubetest2-kops/deployer/down.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,16 @@ func (d *deployer) Down() error {
d.KopsBinaryPath, "delete", "cluster",
"--name", d.ClusterName,
"--yes",
"--count=0",
"--interval=60s",
"--wait=60m",
}
version, err := kops.GetVersion(d.KopsBinaryPath)
if err != nil {
return err
}
if version > "1.29" {
args = append(args,
"--interval=60s",
"--wait=60m",
)
}
klog.Info(strings.Join(args, " "))
cmd := exec.Command(args[0], args[1:]...)
Expand Down

0 comments on commit 9bef6ef

Please sign in to comment.