test: allow backends to return fs.ErrorCantListRoot to skip Root tests

This commit is contained in:
Nick Craig-Wood
2026-01-30 17:50:18 +00:00
parent 140ec62683
commit 116d0f3708
2 changed files with 4 additions and 0 deletions
+1
View File
@@ -50,6 +50,7 @@ var (
ErrorNotImplemented = errors.New("optional feature not implemented")
ErrorCommandNotFound = errors.New("command not found")
ErrorFileNameTooLong = errors.New("file name too long")
ErrorCantListRoot = errors.New("can't list root")
)
// CheckClose is a utility function used to check the return from
+3
View File
@@ -1915,6 +1915,9 @@ func Run(t *testing.T, opt *Opt) {
}
t.Logf("Opening root remote %q path %q from %q", configName, configLeaf, subRemoteName)
rootRemote, err := fs.NewFs(context.Background(), configName)
if errors.Is(err, fs.ErrorCantListRoot) {
t.Skip("Can't list from root on this remote")
}
require.NoError(t, err)
file1Root := file1