New ๐ŸŒŠ wave for @helm

Commit 46c51921

46c5192123edMerged

Roman Mironov <[email protected]> ยท 5 years ago ยท 1 file ยท ~1 modified

Description

add autoYaml test

Details

Commit
46c5192123ed
Parent
5353280b055e

pkg/action/build_test.gomodifiedView file

@@ -119,3 +119,33 @@
119119 t.Error("'redis-b' not found")
120120 }
121121 }
122+
123+func TestBuildAutoYml(t *testing.T) {
124+ defer clean()
125+
126+ y := &Yml{
127+ tests.Root + "01_helmwave.yml.tpl",
128+ tests.Root + "01_auto_yaml_helmwave.yml",
129+ }
130+
131+ s := &Build{
132+ plandir: tests.Root + plan.Dir,
133+ tags: cli.StringSlice{},
134+ matchAll: true,
135+ autoYml: true,
136+ yml: y,
137+ }
138+
139+ value := "Test01"
140+ _ = os.Setenv("PROJECT_NAME", value)
141+ _ = os.Setenv("NAMESPACE", value)
142+
143+ err := s.Run()
144+ if err != nil {
145+ t.Error(err)
146+ }
147+
148+ if ok := helper.IsExists(tests.Root + plan.Dir + plan.Manifest); !ok {
149+ t.Error(plan.ErrManifestDirNotFound)
150+ }
151+}