From 528893ce1d2f0331d4399810a4f46932efdce8a7 Mon Sep 17 00:00:00 2001 From: John Mulligan Date: Mon, 23 Aug 2021 12:04:41 -0400 Subject: [PATCH] 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 --- cephfs/path_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cephfs/path_test.go b/cephfs/path_test.go index 2a46958..6ade4b6 100644 --- a/cephfs/path_test.go +++ b/cephfs/path_test.go @@ -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.