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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user