diff --git a/fstest/fstest.go b/fstest/fstest.go index d29c25422..032a50853 100644 --- a/fstest/fstest.go +++ b/fstest/fstest.go @@ -48,7 +48,7 @@ var ( // ListRetries is the number of times to retry a listing to overcome eventual consistency ListRetries = flag.Int("list-retries", 3, "Number or times to retry listing") // MatchTestRemote matches the remote names used for testing - MatchTestRemote = regexp.MustCompile(`^rclone-test-[abcdefghijklmnopqrstuvwxyz0123456789]{24}$`) + MatchTestRemote = regexp.MustCompile(`^rclone-test-[abcdefghijklmnopqrstuvwxyz0123456789]{12}$`) ) // Initialise rclone for testing @@ -266,7 +266,7 @@ func CheckListingWithRoot(t *testing.T, f fs.Fs, dir string, items []Item, expec var objs []fs.Object var dirs []fs.Directory var err error - var retries = *ListRetries + retries := *ListRetries sleep := time.Second / 2 wantListing := makeListingFromItems(items) gotListing := "" @@ -431,7 +431,7 @@ func RandomRemoteName(remoteName string) (string, string, error) { if !strings.HasSuffix(remoteName, ":") { remoteName += "/" } - leafName = "rclone-test-" + random.String(24) + leafName = "rclone-test-" + random.String(12) if !MatchTestRemote.MatchString(leafName) { log.Fatalf("%q didn't match the test remote name regexp", leafName) } diff --git a/fstest/test_all/clean.go b/fstest/test_all/clean.go index 6da23b7e1..788061cf3 100644 --- a/fstest/test_all/clean.go +++ b/fstest/test_all/clean.go @@ -17,7 +17,7 @@ import ( // MatchTestRemote matches the remote names used for testing (copied // from fstest/fstest.go so we don't have to import that and get all // its flags) -var MatchTestRemote = regexp.MustCompile(`^rclone-test-[abcdefghijklmnopqrstuvwxyz0123456789]{24}(_segments)?$`) +var MatchTestRemote = regexp.MustCompile(`^rclone-test-[abcdefghijklmnopqrstuvwxyz0123456789]{12,24}(_segments)?$`) // cleanFs runs a single clean fs for left over directories func cleanFs(ctx context.Context, remote string, cleanup bool) error {