From e2816629d09cfd40adced10cdcb1ecee2959de9d Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Tue, 1 Sep 2020 15:43:41 +0100 Subject: [PATCH] fstest: fix upwrapping tests for bucket based remotes TestIntegration/FsRmdirNotFound was failing on crypt wrapping a bucket based remote. This was spotted by the integration tests. --- fstest/fstests/fstests.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fstest/fstests/fstests.go b/fstest/fstests/fstests.go index 5ea310e95..381d64ae1 100644 --- a/fstest/fstests/fstests.go +++ b/fstest/fstests/fstests.go @@ -335,7 +335,8 @@ func Run(t *testing.T, opt *Opt) { // Return true if f (or any of the things it wraps) is bucket // based but not at the root. isBucketBasedButNotRoot := func(f fs.Fs) bool { - return fs.UnWrapFs(f).Features().BucketBased && strings.Contains(strings.Trim(f.Root(), "/"), "/") + f = fs.UnWrapFs(f) + return f.Features().BucketBased && strings.Contains(strings.Trim(f.Root(), "/"), "/") } // Initialise the remote