From 4277d40137a2729261ee00339dfbf2793159aacd Mon Sep 17 00:00:00 2001 From: John Mulligan Date: Mon, 23 Mar 2020 16:56:55 -0400 Subject: [PATCH] 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 --- cephfs/cephfs_test.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cephfs/cephfs_test.go b/cephfs/cephfs_test.go index ccf7852..c91f5d3 100644 --- a/cephfs/cephfs_test.go +++ b/cephfs/cephfs_test.go @@ -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) {