Skip to content

Commit 726b448

Browse files
committed
fix(tests_suite_test.go): seed the rng, use true random numbers for users, passwords, emails
1 parent abb339e commit 726b448

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

_tests/tests_suite_test.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import (
99
"os/user"
1010
"path"
1111
"testing"
12+
"time"
1213

1314
. "github.com/onsi/ginkgo"
1415
. "github.com/onsi/ginkgo/config"
@@ -23,7 +24,7 @@ const (
2324
)
2425

2526
func init() {
26-
rand.Seed(GinkgoConfig.RandomSeed)
27+
rand.Seed(time.Now().UnixNano())
2728
}
2829

2930
func getRandAppName() string {
@@ -36,12 +37,12 @@ func TestTests(t *testing.T) {
3637
}
3738

3839
var (
39-
testAdminUser = fmt.Sprintf("test-admin-%d", GinkgoConfig.RandomSeed)
40+
testAdminUser = fmt.Sprintf("test-admin-%d", rand.Intn(1000))
4041
testAdminPassword = "asdf1234"
41-
testAdminEmail = fmt.Sprintf("test-admin-%d@deis.io", GinkgoConfig.RandomSeed)
42-
testUser = fmt.Sprintf("test-%d", GinkgoConfig.RandomSeed)
42+
testAdminEmail = fmt.Sprintf("test-admin-%d@deis.io", rand.Intn(1000))
43+
testUser = fmt.Sprintf("test-%d", rand.Intn(1000))
4344
testPassword = "asdf1234"
44-
testEmail = fmt.Sprintf("test-%d@deis.io", GinkgoConfig.RandomSeed)
45+
testEmail = fmt.Sprintf("test-%d@deis.io", rand.Intn(1000))
4546
url = getController()
4647
)
4748

0 commit comments

Comments
 (0)