I am working on integrating Azure Files and am currently facing a problem with FsRmdirNotFound FsRmdirEmpty test cases.
The two test cases follow
t.Run("FsRmdirEmpty", func(t *testing.T) {
skipIfNotOk(t)
err := f.Rmdir(ctx, "")
require.NoError(t, err)
})
t.Run("FsRmdirNotFound", func(t *testing.T) {
skipIfNotOk(t)
if isBucketBasedButNotRoot(f) {
t.Skip("Skipping test as non root bucket-based remote")
}
err := f.Rmdir(ctx, "")
assert.Error(t, err, "Expecting error on Rmdir nonexistent")
})
One test case requires fs.Rmdir to return an error, while the other does not.
Is this a logical error? Am I misunderstanding something?
PS: can FsRmdirEmpty be renamed to FsRmdirEmptyName. FsRmdirEmpty is ambiguous between suggesting no contents vs empty directory name.