Tests: FsRmdirNotFound FsRmdirEmpty cannot both pass

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.

FsRmdirEmpty checks that no error is returned deleting an empty directory.

FsRmdirNotFound checks that an error is returned deleting a non existent directory.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.