Skip to content

Commit a1d6e30

Browse files
corneliusludmannroboquat
authored andcommitted
[installer] Reset seed for each render test
1 parent 7bbd9cf commit a1d6e30

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

install/installer/cmd/render_test.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ var (
1919
func init() {
2020
// Ensure that the randomisation always returns the same values
2121
rootOpts.SeedValue = 42
22-
setSeed()
2322
}
2423

2524
func TestMain(m *testing.M) {
@@ -45,6 +44,10 @@ func TestRender(t *testing.T) {
4544

4645
for _, testCase := range testCases {
4746
t.Run(testCase.Name, func(t *testing.T) {
47+
48+
// reset seed for each test case
49+
setSeed()
50+
4851
rootOpts.VersionMF = "testdata/render/versions.yaml"
4952
renderOpts.ConfigFN = "testdata/render/" + testCase.Name + "/config.yaml"
5053
goldenPath := "testdata/render/" + testCase.Name + "/output.golden"

0 commit comments

Comments
 (0)