Remove the tiny helper functions from plan.go [#67]
Now that InitKube, AddRepo, and UpdateDependencies are initialized with NewSTEPNAME functions, the helper functions in plan.go are unnecessary--they do too little to be a useful abstraction, and they aren't complex or frequently-used enough to be worth extracting.
This commit is contained in:
@@ -175,37 +175,6 @@ func (suite *PlanTestSuite) TestUninstallWithUpdateDependencies() {
|
||||
suite.IsType(&run.DepUpdate{}, steps[1])
|
||||
}
|
||||
|
||||
func (suite *PlanTestSuite) TestInitKube() {
|
||||
cfg := env.Config{}
|
||||
|
||||
steps := initKube(cfg)
|
||||
suite.Require().Equal(1, len(steps), "initKube should return one step")
|
||||
suite.IsType(&run.InitKube{}, steps[0])
|
||||
}
|
||||
|
||||
func (suite *PlanTestSuite) TestDepUpdate() {
|
||||
cfg := env.Config{
|
||||
UpdateDependencies: true,
|
||||
}
|
||||
|
||||
steps := depUpdate(cfg)
|
||||
suite.Require().Equal(1, len(steps), "depUpdate should return one step")
|
||||
suite.IsType(&run.DepUpdate{}, steps[0])
|
||||
}
|
||||
|
||||
func (suite *PlanTestSuite) TestAddRepos() {
|
||||
cfg := env.Config{
|
||||
AddRepos: []string{
|
||||
"first=https://add.repos/one",
|
||||
"second=https://add.repos/two",
|
||||
},
|
||||
}
|
||||
steps := addRepos(cfg)
|
||||
suite.Require().Equal(2, len(steps), "addRepos should add one step per repo")
|
||||
suite.IsType(&run.AddRepo{}, steps[0])
|
||||
suite.IsType(&run.AddRepo{}, steps[1])
|
||||
}
|
||||
|
||||
func (suite *PlanTestSuite) TestLint() {
|
||||
steps := lint(env.Config{})
|
||||
suite.Require().Equal(1, len(steps))
|
||||
|
||||
Reference in New Issue
Block a user