accounting: add context.Context #3257 #4685

This commit is contained in:
Nick Craig-Wood
2020-11-05 16:59:59 +00:00
parent e3fe31f7cb
commit 1fb6ad700f
29 changed files with 138 additions and 109 deletions

View File

@@ -2,6 +2,7 @@ package config
import (
"bytes"
"context"
"fmt"
"io/ioutil"
"os"
@@ -15,6 +16,7 @@ import (
)
func testConfigFile(t *testing.T, configFileName string) func() {
ctx := context.Background()
configKey = nil // reset password
_ = os.Unsetenv("_RCLONE_CONFIG_KEY_FILE")
_ = os.Unsetenv("RCLONE_CONFIG_PASS")
@@ -36,7 +38,7 @@ func testConfigFile(t *testing.T, configFileName string) func() {
fs.Config = &fs.ConfigInfo{}
configFile = nil
LoadConfig()
LoadConfig(ctx)
assert.Equal(t, []string{}, getConfigData().GetSectionList())
// Fake a remote