cephfs: remove directory created in the ChangeDir test

The test function that exercises ChangeDir was creating a directory
and leaving it behind. Add some basic cleanup to the test to try
and avoid leaking stuff between test runs.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
This commit is contained in:
John Mulligan 2020-03-23 16:56:55 -04:00 committed by John Mulligan
parent 36196c5e60
commit 4277d40137
1 changed files with 5 additions and 0 deletions

View File

@ -130,6 +130,11 @@ func TestChangeDir(t *testing.T) {
assert.NotEqual(t, dir1, dir2)
assert.Equal(t, dir1, "/")
assert.Equal(t, dir2, "/asdf")
err = mount.ChangeDir("/")
assert.NoError(t, err)
err = mount.RemoveDir("/asdf")
assert.NoError(t, err)
}
func TestRemoveDir(t *testing.T) {