diff options
author | Valery Piashchynski <[email protected]> | 2021-03-28 21:24:12 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2021-03-29 13:33:06 +0300 |
commit | 5a6c8b22148d7e97d20cf94d4978557cf0faec37 (patch) | |
tree | febd9dc96d3cc892fe8a83471fc1e888b5c2d4d2 /tests/plugins/reload/reload_plugin_test.go | |
parent | 92c5ee7ec150f48362fe839a73da9ec5fd646eb9 (diff) |
- Fix new linters warningsv2.0.3
Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'tests/plugins/reload/reload_plugin_test.go')
-rw-r--r-- | tests/plugins/reload/reload_plugin_test.go | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/tests/plugins/reload/reload_plugin_test.go b/tests/plugins/reload/reload_plugin_test.go index 2e246480..dcbedb0f 100644 --- a/tests/plugins/reload/reload_plugin_test.go +++ b/tests/plugins/reload/reload_plugin_test.go @@ -220,10 +220,10 @@ func randomlyChangeFile(t *testing.T) { // let's try to randomly change it for i := 0; i < 10; i++ { // rand sleep - rSleep := rand.Int63n(500) // nolint:gosec + rSleep := rand.Int63n(500) //nolint:gosec time.Sleep(time.Millisecond * time.Duration(rSleep)) - rNum := rand.Int63n(int64(hugeNumberOfFiles)) // nolint:gosec - err := ioutil.WriteFile(filepath.Join(testDir, "file_"+strconv.Itoa(int(rNum))+".txt"), []byte("Hello, Gophers!"), 0755) // nolint:gosec + rNum := rand.Int63n(int64(hugeNumberOfFiles)) //nolint:gosec + err := ioutil.WriteFile(filepath.Join(testDir, "file_"+strconv.Itoa(int(rNum))+".txt"), []byte("Hello, Gophers!"), 0755) //nolint:gosec assert.NoError(t, err) } } @@ -339,20 +339,20 @@ func reloadFilteredExt(t *testing.T) { // change files with abc extension for i := 0; i < 10; i++ { // rand sleep - rSleep := rand.Int63n(1000) // nolint:gosec + rSleep := rand.Int63n(1000) //nolint:gosec time.Sleep(time.Millisecond * time.Duration(rSleep)) - rNum := rand.Int63n(int64(hugeNumberOfFiles)) // nolint:gosec - err := ioutil.WriteFile(filepath.Join(testDir, "file_"+strconv.Itoa(int(rNum))+".abc"), []byte("Hello, Gophers!"), 0755) // nolint:gosec + rNum := rand.Int63n(int64(hugeNumberOfFiles)) //nolint:gosec + err := ioutil.WriteFile(filepath.Join(testDir, "file_"+strconv.Itoa(int(rNum))+".abc"), []byte("Hello, Gophers!"), 0755) //nolint:gosec assert.NoError(t, err) } // change files with def extension for i := 0; i < 10; i++ { // rand sleep - rSleep := rand.Int63n(1000) // nolint:gosec + rSleep := rand.Int63n(1000) //nolint:gosec time.Sleep(time.Millisecond * time.Duration(rSleep)) - rNum := rand.Int63n(int64(hugeNumberOfFiles)) // nolint:gosec - err := ioutil.WriteFile(filepath.Join(testDir, "file_"+strconv.Itoa(int(rNum))+".def"), []byte("Hello, Gophers!"), 0755) // nolint:gosec + rNum := rand.Int63n(int64(hugeNumberOfFiles)) //nolint:gosec + err := ioutil.WriteFile(filepath.Join(testDir, "file_"+strconv.Itoa(int(rNum))+".def"), []byte("Hello, Gophers!"), 0755) //nolint:gosec assert.NoError(t, err) } } @@ -476,11 +476,11 @@ func reloadMoveSupport(t *testing.T) { // move some files for i := 0; i < 10; i++ { // rand sleep - rSleep := rand.Int63n(500) // nolint:gosec + rSleep := rand.Int63n(500) //nolint:gosec time.Sleep(time.Millisecond * time.Duration(rSleep)) - rNum := rand.Int63n(int64(33)) // nolint:gosec - rDir := rand.Int63n(9) // nolint:gosec - rExt := rand.Int63n(3) // nolint:gosec + rNum := rand.Int63n(int64(33)) //nolint:gosec + rDir := rand.Int63n(9) //nolint:gosec + rExt := rand.Int63n(3) //nolint:gosec ext := []string{ ".txt", @@ -512,11 +512,11 @@ func removeFilesSupport(t *testing.T) { // remove some files for i := 0; i < 10; i++ { // rand sleep - rSleep := rand.Int63n(500) // nolint:gosec + rSleep := rand.Int63n(500) //nolint:gosec time.Sleep(time.Millisecond * time.Duration(rSleep)) - rNum := rand.Int63n(int64(100)) // nolint:gosec - rDir := rand.Int63n(10) // nolint:gosec - rExt := rand.Int63n(3) // nolint:gosec + rNum := rand.Int63n(int64(100)) //nolint:gosec + rDir := rand.Int63n(10) //nolint:gosec + rExt := rand.Int63n(3) //nolint:gosec ext := []string{ ".txt", @@ -570,14 +570,14 @@ func randomChangesInRecursiveDirs(t *testing.T) { } for i := 0; i < 10; i++ { // rand sleep - rSleep := rand.Int63n(100) // nolint:gosec + rSleep := rand.Int63n(100) //nolint:gosec time.Sleep(time.Millisecond * time.Duration(rSleep)) - rNum := rand.Int63n(int64(100)) // nolint:gosec - rDir := rand.Int63n(10) // nolint:gosec - rExt := rand.Int63n(3) // nolint:gosec - rName := rand.Int63n(3) // nolint:gosec + rNum := rand.Int63n(int64(100)) //nolint:gosec + rDir := rand.Int63n(10) //nolint:gosec + rExt := rand.Int63n(3) //nolint:gosec + rName := rand.Int63n(3) //nolint:gosec - err := ioutil.WriteFile(filepath.Join(dirs[rDir], filenames[rName]+strconv.Itoa(int(rNum))+ext[rExt]), []byte("Hello, Gophers!"), 0755) // nolint:gosec + err := ioutil.WriteFile(filepath.Join(dirs[rDir], filenames[rName]+strconv.Itoa(int(rNum))+ext[rExt]), []byte("Hello, Gophers!"), 0755) //nolint:gosec assert.NoError(t, err) } } |