Merge remote-tracking branch 'origin/master' into help-by-default

This commit is contained in:
Erin Call
2019-12-26 12:23:14 -08:00
16 changed files with 478 additions and 131 deletions

View File

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