New ๐ŸŒŠ wave for @helm

Commit d12a53fa

d12a53faf3d5Merged

Svyatoslav Dumchenko <[email protected]> ยท 4 years ago ยท 1 file ยท ~1 modified

Description

improve pkg/action/build.go tests

Details

Commit
d12a53faf3d5
Parent
ac2a6519ab15

pkg/action/build_test.gomodifiedView file

@@ -21,7 +21,7 @@
2121 _ = os.RemoveAll(tests.Root + plan.Dir)
2222 }
2323
24-func (ts *BuildTestSuite) BuildManifest() {
24+func (ts *BuildTestSuite) TestManifest() {
2525 y := &Yml{
2626 tests.Root + "01_helmwave.yml.tpl",
2727 tests.Root + "02_helmwave.yml",
@@ -38,7 +38,7 @@
3838 ts.Require().DirExists(tests.Root + plan.Dir + plan.Manifest)
3939 }
4040
41-// func (ts *BuildTestSuite) BuildRepositories404() {
41+// func (ts *BuildTestSuite) TestRepositories404() {
4242 // s := &Build{
4343 // plandir: tests.Root + plan.Dir,
4444 // ymlFile: tests.Root + "04_helmwave.yml",
@@ -52,7 +52,7 @@
5252 // }
5353 // }
5454
55-func (ts *BuildTestSuite) BuildRepositories() {
55+func (ts *BuildTestSuite) TestRepositories() {
5656 y := &Yml{
5757 tests.Root + "01_helmwave.yml.tpl",
5858 tests.Root + "02_helmwave.yml",
@@ -75,7 +75,7 @@
7575 }
7676 }
7777
78-func (ts *BuildTestSuite) BuildReleasesMatchGroup() {
78+func (ts *BuildTestSuite) TestReleasesMatchGroup() {
7979 y := &Yml{
8080 tests.Root + "01_helmwave.yml.tpl",
8181 tests.Root + "03_helmwave.yml",
@@ -117,7 +117,7 @@
117117
118118 }
119119
120-func (ts *BuildTestSuite) BuildAutoYml() {
120+func (ts *BuildTestSuite) TestAutoYml() {
121121 y := &Yml{
122122 tests.Root + "01_helmwave.yml.tpl",
123123 tests.Root + "01_auto_yaml_helmwave.yml",
@@ -139,7 +139,7 @@
139139 ts.Require().DirExists(tests.Root + plan.Dir + plan.Manifest)
140140 }
141141
142-func (ts *BuildTestSuite) BuildGomplate() {
142+func (ts *BuildTestSuite) TestGomplate() {
143143 y := &Yml{
144144 tests.Root + "08_helmwave.yml",
145145 tests.Root + "08_values.yml",
@@ -161,6 +161,44 @@
161161 ts.Require().DirExists(tests.Root + plan.Dir + plan.Manifest)
162162 }
163163
164+func (ts *BuildTestSuite) TestDiffLocal() {
165+ y := &Yml{
166+ tests.Root + "08_helmwave.yml",
167+ tests.Root + "08_values.yml",
168+ }
169+
170+ s := &Build{
171+ plandir: tests.Root + plan.Dir,
172+ tags: cli.StringSlice{},
173+ matchAll: true,
174+ autoYml: true,
175+ yml: y,
176+ diff: &Diff{},
177+ diffMode: diffModeLocal,
178+ }
179+
180+ ts.Require().NoError(s.Run())
181+}
182+
183+func (ts *BuildTestSuite) TestDiffLive() {
184+ y := &Yml{
185+ tests.Root + "08_helmwave.yml",
186+ tests.Root + "08_values.yml",
187+ }
188+
189+ s := &Build{
190+ plandir: tests.Root + plan.Dir,
191+ tags: cli.StringSlice{},
192+ matchAll: true,
193+ autoYml: true,
194+ yml: y,
195+ diff: &Diff{},
196+ diffMode: diffModeLive,
197+ }
198+
199+ ts.Require().NoError(s.Run())
200+}
201+
164202 func TestBuildTestSuite(t *testing.T) {
165203 // t.Parallel()
166204 suite.Run(t, new(BuildTestSuite))