Don't initialize the global RNG with GinkgoRandomSeed() in e2e tests

- It probably doesn't actually make a difference: in experiments,
  the github.com/containers/storage/pkg/stringid RNG initialization
  has been happening later
- This makes the RNG caller-controlled (which we don't benefit from),
  but also the same on all nodes of multi-process Ginkgo execution.
  So, if it works at all, it may make collisions of random ID values
  more likely, and our tests are not robust against that. So don't
  go out of our way to make collisions more likely.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
This commit is contained in:
Miloslav Trmač
2021-11-29 18:58:38 +01:00
parent 90e74e794c
commit f6a3eddd2c

View File

@ -470,10 +470,6 @@ func Containerized() bool {
return strings.Contains(string(b), "docker")
}
func init() {
rand.Seed(GinkgoRandomSeed())
}
var randomLetters = []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ")
// RandomString returns a string of given length composed of random characters