1
0
mirror of https://github.com/rclone/rclone.git synced 2025-10-30 23:17:59 +02:00

fstest: add ResetRun to allow the remote to be reset in tests

This commit is contained in:
Nick Craig-Wood
2025-10-29 21:33:36 +00:00
parent 459e10d599
commit 203df6cc58

View File

@@ -60,11 +60,16 @@ type Run struct {
Logf, Fatalf func(text string, args ...any)
}
// ResetRun re-reads the command line arguments into the global run.
func ResetRun() {
oneRun = newRun()
}
// TestMain drives the tests
func TestMain(m *testing.M) {
flag.Parse()
if !*Individual {
oneRun = newRun()
ResetRun()
}
rc := m.Run()
if !*Individual {