cephfs: have test cases remove dirs they create

To prevent test failures re-reunning the suite against the same fs we
need to make sure tests clean up after themselves.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
This commit is contained in:
John Mulligan 2020-03-24 20:02:56 -04:00 committed by Niels de Vos
parent 175cba3388
commit 673c60bc51
1 changed files with 2 additions and 0 deletions

View File

@ -203,6 +203,7 @@ func TestChmodDir(t *testing.T) {
err := mount.MakeDir(dirname, stats_before) err := mount.MakeDir(dirname, stats_before)
assert.NoError(t, err) assert.NoError(t, err)
defer mount.RemoveDir(dirname)
err = mount.SyncFs() err = mount.SyncFs()
assert.NoError(t, err) assert.NoError(t, err)
@ -235,6 +236,7 @@ func TestChown(t *testing.T) {
err := mount.MakeDir(dirname, 0755) err := mount.MakeDir(dirname, 0755)
assert.NoError(t, err) assert.NoError(t, err)
defer mount.RemoveDir(dirname)
err = mount.SyncFs() err = mount.SyncFs()
assert.NoError(t, err) assert.NoError(t, err)