config: add config/paths to the rc as rclone config paths equivalent

Fixes #7568
This commit is contained in:
Nick Craig-Wood 2024-01-17 10:36:17 +00:00
parent 17fea90ac9
commit c482624a6c
2 changed files with 47 additions and 0 deletions

View file

@ -177,3 +177,14 @@ func TestRcSetPath(t *testing.T) {
require.NoError(t, err)
assert.Equal(t, oldPath, config.GetConfigPath())
}
func TestRcPaths(t *testing.T) {
call := rc.Calls.Get("config/paths")
assert.NotNil(t, call)
out, err := call.Fn(context.Background(), nil)
require.NoError(t, err)
assert.Equal(t, config.GetConfigPath(), out["config"])
assert.Equal(t, config.GetCacheDir(), out["cache"])
assert.Equal(t, os.TempDir(), out["temp"])
}