test: allow backends to return fs.ErrorCantListRoot to skip Root tests
This commit is contained in:
@@ -50,6 +50,7 @@ var (
|
|||||||
ErrorNotImplemented = errors.New("optional feature not implemented")
|
ErrorNotImplemented = errors.New("optional feature not implemented")
|
||||||
ErrorCommandNotFound = errors.New("command not found")
|
ErrorCommandNotFound = errors.New("command not found")
|
||||||
ErrorFileNameTooLong = errors.New("file name too long")
|
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
|
// CheckClose is a utility function used to check the return from
|
||||||
|
|||||||
@@ -1915,6 +1915,9 @@ func Run(t *testing.T, opt *Opt) {
|
|||||||
}
|
}
|
||||||
t.Logf("Opening root remote %q path %q from %q", configName, configLeaf, subRemoteName)
|
t.Logf("Opening root remote %q path %q from %q", configName, configLeaf, subRemoteName)
|
||||||
rootRemote, err := fs.NewFs(context.Background(), configName)
|
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)
|
require.NoError(t, err)
|
||||||
|
|
||||||
file1Root := file1
|
file1Root := file1
|
||||||
|
|||||||
Reference in New Issue
Block a user