fix test
This commit is contained in:
parent
8d450bbf7d
commit
eeccfdd143
|
@ -2,11 +2,12 @@ package run
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"strings"
|
||||||
|
"testing"
|
||||||
|
|
||||||
"github.com/golang/mock/gomock"
|
"github.com/golang/mock/gomock"
|
||||||
"github.com/pelotech/drone-helm3/internal/env"
|
"github.com/pelotech/drone-helm3/internal/env"
|
||||||
"github.com/stretchr/testify/suite"
|
"github.com/stretchr/testify/suite"
|
||||||
"strings"
|
|
||||||
"testing"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type UpgradeTestSuite struct {
|
type UpgradeTestSuite struct {
|
||||||
|
@ -228,16 +229,16 @@ func (suite *UpgradeTestSuite) TestPrepareDebugFlag() {
|
||||||
func (suite *UpgradeTestSuite) TestPrepareSkipCrdsFlag() {
|
func (suite *UpgradeTestSuite) TestPrepareSkipCrdsFlag() {
|
||||||
defer suite.ctrl.Finish()
|
defer suite.ctrl.Finish()
|
||||||
|
|
||||||
cfg := env.Config{
|
cfg := env.NewTestConfig(suite.T())
|
||||||
Chart: "at40",
|
cfg.Chart = "at40"
|
||||||
Release: "cabbages_smell_great",
|
cfg.Release = "cabbages_smell_great"
|
||||||
SkipCrds: true,
|
cfg.SkipCrds = true
|
||||||
}
|
|
||||||
u := NewUpgrade(cfg)
|
u := NewUpgrade(*cfg)
|
||||||
|
|
||||||
command = func(path string, args ...string) cmd {
|
command = func(path string, args ...string) cmd {
|
||||||
suite.Equal(helmBin, path)
|
suite.Equal(helmBin, path)
|
||||||
suite.Equal([]string{"upgrade", "--install", "--skip-crds", "cabbages_smell_great", "at40"}, args)
|
suite.Equal([]string{"upgrade", "--install", "--skip-crds", "--history-max=10", "cabbages_smell_great", "at40"}, args)
|
||||||
|
|
||||||
return suite.mockCmd
|
return suite.mockCmd
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue