Merge remote-tracking branch 'origin/master' into help-by-default
This commit is contained in:
@@ -4,7 +4,7 @@ import (
|
||||
"fmt"
|
||||
"github.com/golang/mock/gomock"
|
||||
"github.com/stretchr/testify/suite"
|
||||
"os"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/pelotech/drone-helm3/internal/run"
|
||||
@@ -29,26 +29,28 @@ func (suite *PlanTestSuite) TestNewPlan() {
|
||||
}
|
||||
defer func() { help = origHelp }()
|
||||
|
||||
stdout := strings.Builder{}
|
||||
stderr := strings.Builder{}
|
||||
cfg := Config{
|
||||
Command: "help",
|
||||
Debug: false,
|
||||
KubeConfig: "/branch/.sfere/profig",
|
||||
Values: "steadfastness,forthrightness",
|
||||
StringValues: "tensile_strength,flexibility",
|
||||
ValuesFiles: []string{"/root/price_inventory.yml"},
|
||||
Namespace: "outer",
|
||||
Stdout: &stdout,
|
||||
Stderr: &stderr,
|
||||
}
|
||||
|
||||
runCfg := run.Config{
|
||||
HelmCommand: "help",
|
||||
Debug: false,
|
||||
KubeConfig: "/branch/.sfere/profig",
|
||||
Values: "steadfastness,forthrightness",
|
||||
StringValues: "tensile_strength,flexibility",
|
||||
ValuesFiles: []string{"/root/price_inventory.yml"},
|
||||
Namespace: "outer",
|
||||
Stdout: os.Stdout,
|
||||
Stderr: os.Stderr,
|
||||
Stdout: &stdout,
|
||||
Stderr: &stderr,
|
||||
}
|
||||
|
||||
stepOne.EXPECT().
|
||||
@@ -143,6 +145,7 @@ func (suite *PlanTestSuite) TestDel() {
|
||||
ServiceAccount: "greathelm",
|
||||
Token: "b2YgbXkgYWZmZWN0aW9u",
|
||||
TemplateFile: kubeConfigTemplate,
|
||||
ConfigFile: kubeConfigFile,
|
||||
}
|
||||
|
||||
suite.Equal(expected, init)
|
||||
@@ -177,6 +180,7 @@ func (suite *PlanTestSuite) TestInitKube() {
|
||||
ServiceAccount: "helmet",
|
||||
Token: "cXVlZXIgY2hhcmFjdGVyCg==",
|
||||
TemplateFile: kubeConfigTemplate,
|
||||
ConfigFile: kubeConfigFile,
|
||||
}
|
||||
suite.Equal(expected, init)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user