test: use parameter instead of hardcoded constant

This commit is contained in:
Michael Eischer
2023-05-18 19:31:42 +02:00
parent a719d10e22
commit 0058745881
3 changed files with 3 additions and 3 deletions

View File

@@ -18,7 +18,7 @@ import (
func createTestFiles(t testing.TB, num int) (files []string) {
tempdir := test.TempDir(t)
for i := 0; i < 15; i++ {
for i := 0; i < num; i++ {
filename := fmt.Sprintf("testfile-%d", i)
err := os.WriteFile(filepath.Join(tempdir, filename), []byte(filename), 0600)
if err != nil {