Rename kube_init_skip to skip_kubeconfig

This commit is contained in:
minhdanh
2020-08-25 09:59:06 +07:00
parent 0e58dde591
commit 5b4e3ab2ea
4 changed files with 23 additions and 15 deletions

View File

@@ -92,7 +92,7 @@ func (p *Plan) Execute() error {
var upgrade = func(cfg env.Config) []Step {
var steps []Step
if !cfg.KubeInitSkip {
if !cfg.SkipKubeconfig {
steps = append(steps, run.NewInitKube(cfg, kubeConfigTemplate, kubeConfigFile))
}
for _, repo := range cfg.AddRepos {
@@ -114,7 +114,7 @@ var upgrade = func(cfg env.Config) []Step {
var uninstall = func(cfg env.Config) []Step {
var steps []Step
if !cfg.KubeInitSkip {
if !cfg.SkipKubeconfig {
steps = append(steps, run.NewInitKube(cfg, kubeConfigTemplate, kubeConfigFile))
}
if cfg.UpdateDependencies {

View File

@@ -122,8 +122,8 @@ func (suite *PlanTestSuite) TestUpgrade() {
suite.IsType(&run.Upgrade{}, steps[1])
}
func (suite *PlanTestSuite) TestUpgradeWithKubeInitSkip() {
steps := upgrade(env.Config{KubeInitSkip: true})
func (suite *PlanTestSuite) TestUpgradeWithSkipKubeconfig() {
steps := upgrade(env.Config{SkipKubeconfig: true})
suite.Require().Equal(1, len(steps), "upgrade should return 1 step")
suite.IsType(&run.Upgrade{}, steps[0])
}