Initialize Steps with a NewSTEPNAME function [#67]
This seems to be be a more natural separation of concerns--the knowledge of which config fields map to which parts of a Step belong to the Step, not to the Plan.
This commit is contained in:
@@ -3,6 +3,7 @@ package run
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/golang/mock/gomock"
|
||||
"github.com/pelotech/drone-helm3/internal/env"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/suite"
|
||||
"strings"
|
||||
@@ -17,6 +18,15 @@ func TestHelpTestSuite(t *testing.T) {
|
||||
suite.Run(t, new(HelpTestSuite))
|
||||
}
|
||||
|
||||
func (suite *HelpTestSuite) TestNewHelp() {
|
||||
cfg := env.Config{
|
||||
Command: "everybody dance NOW!!",
|
||||
}
|
||||
help := NewHelp(cfg)
|
||||
suite.Require().NotNil(help)
|
||||
suite.Equal("everybody dance NOW!!", help.HelmCommand)
|
||||
}
|
||||
|
||||
func (suite *HelpTestSuite) TestPrepare() {
|
||||
ctrl := gomock.NewController(suite.T())
|
||||
defer ctrl.Finish()
|
||||
|
||||
Reference in New Issue
Block a user