]> ruderich.org/simon Gitweb - safcm/safcm.git/commitdiff
remote: tests: remove call to math/rand.Seed which is a no-op master
authorSimon Ruderich <simon@ruderich.org>
Sat, 1 Nov 2025 09:32:58 +0000 (10:32 +0100)
committerSimon Ruderich <simon@ruderich.org>
Sat, 1 Nov 2025 09:32:58 +0000 (10:32 +0100)
I misjudged the linter warning in 5141405 (Update dependencies, static
checkers and Go to 1.24, 2025-10-17). rand.Seed is a no-op since 1.24.

The test works fine without a static seed.

remote/sync/files_test.go

index 2472a15a533c29ab7c3f8b54e1e761b94d574e75..4f46935fdb6b1530b63e6d91107e24488a7c5a58 100644 (file)
@@ -6,7 +6,6 @@ package sync
 import (
        "fmt"
        "io/fs"
-       "math/rand"
        "os"
        "regexp"
        "testing"
@@ -3006,9 +3005,6 @@ file
                                t.Fatal(err)
                        }
 
-                       // Deterministic temporary symlink names
-                       rand.Seed(0) //nolint:staticcheck // SA1019 need fixed seed
-
                        var changed bool
                        err = s.syncFile(tc.file, &changed)
                        testutil.AssertErrorEqual(t, "err", err, tc.expErr)