mirror of https://github.com/rclone/rclone
fstest: add ResetRun to allow the remote to be reset in tests
This commit is contained in:
parent
459e10d599
commit
203df6cc58
|
|
@ -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 {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue