Merge branch 'master' into config-fixup
This commit is contained in:
@@ -51,9 +51,6 @@ func (i *InitKube) Prepare(cfg Config) error {
|
||||
if i.Token == "" {
|
||||
return errors.New("token is needed to deploy")
|
||||
}
|
||||
if i.Certificate == "" && !i.SkipTLSVerify {
|
||||
return errors.New("certificate is needed to deploy")
|
||||
}
|
||||
|
||||
if i.ServiceAccount == "" {
|
||||
i.ServiceAccount = "helm"
|
||||
|
||||
@@ -132,13 +132,6 @@ func (suite *InitKubeTestSuite) TestPrepareRequiredConfig() {
|
||||
init.APIServer = "Sysadmin"
|
||||
init.Token = ""
|
||||
suite.Error(init.Prepare(cfg), "Token should be required.")
|
||||
|
||||
init.Token = "Aspire virtual currency"
|
||||
init.Certificate = ""
|
||||
suite.Error(init.Prepare(cfg), "Certificate should be required.")
|
||||
|
||||
init.SkipTLSVerify = true
|
||||
suite.NoError(init.Prepare(cfg), "Certificate should not be required if SkipTLSVerify is true")
|
||||
}
|
||||
|
||||
func (suite *InitKubeTestSuite) TestPrepareDefaultsServiceAccount() {
|
||||
|
||||
@@ -16,6 +16,8 @@ func (l *Lint) Execute(_ Config) error {
|
||||
}
|
||||
|
||||
// Prepare gets the Lint ready to execute.
|
||||
// Note: mandatory settings are documented in README.md, and the full list of settings is in docs/lint_settings.yml.
|
||||
// Any additions or deletions here should be reflected there.
|
||||
func (l *Lint) Prepare(cfg Config) error {
|
||||
if l.Chart == "" {
|
||||
return fmt.Errorf("chart is required")
|
||||
|
||||
@@ -25,6 +25,8 @@ func (u *Upgrade) Execute(_ Config) error {
|
||||
}
|
||||
|
||||
// Prepare gets the Upgrade ready to execute.
|
||||
// Note: mandatory settings are documented in README.md, and the full list of settings is in docs/upgrade_settings.yml.
|
||||
// Any additions or deletions here should be reflected there.
|
||||
func (u *Upgrade) Prepare(cfg Config) error {
|
||||
if u.Chart == "" {
|
||||
return fmt.Errorf("chart is required")
|
||||
|
||||
Reference in New Issue
Block a user