Skip to content

Commit 6001f45

Browse files
committed
ref(tests_suite_test.go,util_test.go): move rand seed and utility fun to common file
1 parent 02e6ae1 commit 6001f45

2 files changed

Lines changed: 9 additions & 16 deletions

File tree

_tests/tests_suite_test.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package _tests_test
33
import (
44
"bytes"
55
"fmt"
6+
"math/rand"
67
"os"
78
"os/exec"
89
"os/user"
@@ -16,6 +17,14 @@ import (
1617
"testing"
1718
)
1819

20+
func init() {
21+
rand.Seed(GinkgoConfig.RandomSeed)
22+
}
23+
24+
func getRandAppName() string {
25+
return fmt.Sprintf("apps-test-%d", rand.Int())
26+
}
27+
1928
func TestTests(t *testing.T) {
2029
RegisterFailHandler(Fail)
2130
RunSpecs(t, "Tests Suite")

_tests/util_test.go

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)