Return an error on unknown commands [#15]
I'm probably overthinking this--explicitly calling help is a strange and unusual case--but it doesn't really hurt, so I'm going for it.
This commit is contained in:
@@ -26,6 +26,7 @@ func NewPlan(cfg Config) (*Plan, error) {
|
||||
p := Plan{
|
||||
cfg: cfg,
|
||||
runCfg: run.Config{
|
||||
HelmCommand: string(cfg.Command),
|
||||
Debug: cfg.Debug,
|
||||
KubeConfig: cfg.KubeConfig,
|
||||
Values: cfg.Values,
|
||||
|
||||
@@ -40,6 +40,7 @@ func (suite *PlanTestSuite) TestNewPlan() {
|
||||
}
|
||||
|
||||
runCfg := run.Config{
|
||||
HelmCommand: "help",
|
||||
Debug: false,
|
||||
KubeConfig: "/branch/.sfere/profig",
|
||||
Values: "steadfastness,forthrightness",
|
||||
@@ -255,10 +256,3 @@ func (suite *PlanTestSuite) TestDeterminePlanHelpCommand() {
|
||||
stepsMaker := determineSteps(cfg)
|
||||
suite.Same(&help, stepsMaker)
|
||||
}
|
||||
|
||||
func (suite *PlanTestSuite) TestDeterminePlanHelpOnUnknown() {
|
||||
cfg := Config{}
|
||||
|
||||
stepsMaker := determineSteps(cfg)
|
||||
suite.Same(&help, stepsMaker)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user