cephfs: clean up symlink created in TestSymlink func

Add a defer to clean up the symlink created by the test.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
This commit is contained in:
John Mulligan 2021-08-23 12:04:41 -04:00 committed by Sven Anderson
parent 83c0acf52c
commit 528893ce1d

View File

@ -254,6 +254,9 @@ func TestSymlink(t *testing.T) {
err = mount.Symlink("/", "someDir")
assert.NoError(t, err)
defer func() {
assert.NoError(t, mount.Unlink("someDir"))
}()
err = mount.Symlink("someFile", "/")
// Error, permission denied.