New ๐ŸŒŠ wave for @helm

Commit 0e3e39ea

0e3e39ea32f8Merged

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

Description

fix tests

Details

Commit
0e3e39ea32f8
Parent
e88cbe65c89d

pkg/action/yml_test.gomodifiedView file

@@ -4,6 +4,7 @@
44
55 import (
66 "os"
7+ "path/filepath"
78 "testing"
89
910 "github.com/helmwave/helmwave/pkg/plan"
@@ -14,31 +15,20 @@
1415
1516 type YmlTestSuite struct {
1617 suite.Suite
17-}
18-
19-func (s *YmlTestSuite) TearDownTest() {
20- _ = os.RemoveAll(tests.Root + plan.Dir)
2118 }
2219
2320 func (s *YmlTestSuite) TestRenderEnv() {
21+ tmpDir := ts.T().TempDir()
2422 y := &Yml{
25- tests.Root + "01_helmwave.yml.tpl",
26- tests.Root + "01_helmwave.yml",
23+ filepath.Join(tests.Root, "01_helmwave.yml.tpl"),
24+ filepath.Join(tmpDir, "01_helmwave.yml"),
2725 }
28- defer os.Remove(y.file)
2926
3027 value := "test01"
3128 s.T().Setenv("PROJECT_NAME", value)
3229 s.T().Setenv("NAMESPACE", value)
3330
34- template.SetConfig(&template.Config{
35- Gomplate: template.GomplateConfig{
36- Enabled: false,
37- },
38- })
39-
40- err := y.Run()
41- s.Require().NoError(err)
31+ s.Require().NoError(y.Run())
4232
4333 b, err := plan.NewBody(y.file)
4434 s.Require().NoError(err)
@@ -49,6 +39,6 @@
4939 }
5040
5141 func TestYmlTestSuite(t *testing.T) {
52- // t.Parallel()
42+ t.Parallel()
5343 suite.Run(t, new(YmlTestSuite))
5444 }