1
0
mirror of https://github.com/rclone/rclone.git synced 2025-12-06 00:03:32 +00: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) 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 // TestMain drives the tests
func TestMain(m *testing.M) { func TestMain(m *testing.M) {
flag.Parse() flag.Parse()
if !*Individual { if !*Individual {
oneRun = newRun() ResetRun()
} }
rc := m.Run() rc := m.Run()
if !*Individual { if !*Individual {