From 0ae844d1f8b4d57a5e322f9c8415dc577792bd16 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Sat, 22 Jun 2019 17:25:12 +0100 Subject: [PATCH] config: reset environment variables in config file test to fix build --- fs/config/config_test.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/fs/config/config_test.go b/fs/config/config_test.go index cde4da35c..90b474846 100644 --- a/fs/config/config_test.go +++ b/fs/config/config_test.go @@ -16,6 +16,8 @@ import ( func testConfigFile(t *testing.T, configFileName string) func() { configKey = nil // reset password + _ = os.Unsetenv("_RCLONE_CONFIG_KEY_FILE") + _ = os.Unsetenv("RCLONE_CONFIG_PASS") // create temp config file tempFile, err := ioutil.TempFile("", configFileName) assert.NoError(t, err) @@ -63,6 +65,9 @@ func testConfigFile(t *testing.T, configFileName string) func() { ReadLine = oldReadLine fs.Config = oldConfig configFile = oldConfigFile + + _ = os.Unsetenv("_RCLONE_CONFIG_KEY_FILE") + _ = os.Unsetenv("RCLONE_CONFIG_PASS") } }