Skip to content

Commit d064139

Browse files
committed
cleanup
1 parent bc29adb commit d064139

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pkg/testcoverage/badgestorer/github_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ func Test_Github(t *testing.T) {
5454
Branch: "badges-integration-test",
5555
// random badge name must be used because two tests running from different platforms
5656
// in CI can cause race condition if badge has the same name
57-
FileName: "badge-" + randString() + ".svg",
57+
FileName: "badge_" + randString() + ".svg",
5858
}
5959
s := NewGithub(cfg)
6060

@@ -111,10 +111,11 @@ func deleteFile(t *testing.T, cfg Git) {
111111

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

115116
b := make([]rune, rand.Intn(10))
116117
for i := range b {
117-
b[i] = letterRunes[rand.Intn(len(letterRunes))]
118+
b[i] = letterRunes[rand.Intn(l)]
118119
}
119120

120121
return string(b)

0 commit comments

Comments
 (0)