Skip to content

Commit b6f2999

Browse files
authored
Fix testutil.RandomName to use the full character set (#2020)
## Changes It was using first 12 chars, that does not seem intended. ## Tests Existing tests.
1 parent e5b836a commit b6f2999

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/testutil/helpers.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ func RandomName(prefix ...string) string {
2323
randLen := 12
2424
b := make([]byte, randLen)
2525
for i := range b {
26-
b[i] = charset[rand.Intn(randLen)]
26+
b[i] = charset[rand.Intn(len(charset))]
2727
}
2828
if len(prefix) > 0 {
2929
return fmt.Sprintf("%s%s", strings.Join(prefix, ""), b)

0 commit comments

Comments
 (0)