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

View File

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