Skip to content

Commit 1e4b1a0

Browse files
committed
misc: rand.Seed deprecation
See: https://pkg.go.dev/math/[email protected]#Seed Signed-off-by: Hidde Beydals <[email protected]>
1 parent 3c6dcd6 commit 1e4b1a0

File tree

3 files changed

+0
-10
lines changed

3 files changed

+0
-10
lines changed

internal/controller/suite_test.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,6 @@ var (
6060
ctx = ctrl.SetupSignalHandler()
6161
)
6262

63-
func init() {
64-
rand.Seed(time.Now().UnixNano())
65-
}
66-
6763
func TestMain(m *testing.M) {
6864

6965
utilruntime.Must(imagev1.AddToScheme(scheme.Scheme))

internal/policy/numerical_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ package policy
1919
import (
2020
"math/rand"
2121
"testing"
22-
"time"
2322
)
2423

2524
func TestNewNumerical(t *testing.T) {
@@ -146,7 +145,6 @@ func TestNumerical_Latest(t *testing.T) {
146145
}
147146

148147
func shuffle(list []string) []string {
149-
rand.Seed(time.Now().UnixNano())
150148
rand.Shuffle(len(list), func(i, j int) { list[i], list[j] = list[j], list[i] })
151149
return list
152150
}

tests/integration/suite_test.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,6 @@ type ProviderConfig struct {
112112
pushFluxTestImages pushTestImages
113113
}
114114

115-
func init() {
116-
rand.Seed(time.Now().UnixNano())
117-
}
118-
119115
var letterRunes = []rune("abcdefghijklmnopqrstuvwxyz1234567890")
120116

121117
func randStringRunes(n int) string {

0 commit comments

Comments
 (0)