Skip to content

Commit f4dd5a3

Browse files
committed
fix: randString test function incorrect string size
1 parent f48c192 commit f4dd5a3

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

pkg/testcoverage/badgestorer/github_test.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,10 @@ func deleteFile(t *testing.T, cfg Git) {
111111

112112
func randString() string {
113113
letterRunes := []rune("abcdefghijklmnopqrstuvwxyz")
114-
l := len(letterRunes)
115114

116-
b := make([]rune, rand.Intn(10))
115+
b := make([]rune, 10)
117116
for i := range b {
118-
b[i] = letterRunes[rand.Intn(l)]
117+
b[i] = letterRunes[rand.Intn(len(letterRunes))]
119118
}
120119

121120
return string(b)

0 commit comments

Comments
 (0)