Merge branch 'master' into config-fixup

This commit is contained in:
Joachim Hill-Grannec
2019-12-26 11:36:55 -08:00
committed by GitHub
8 changed files with 204 additions and 12 deletions

View File

@@ -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"

View File

@@ -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() {

View File

@@ -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")

View File

@@ -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")