From 130b868d566d6eb44cef0db58a8b79ebe109a2b7 Mon Sep 17 00:00:00 2001 From: Anas Khan <83116240+anxkhn@users.noreply.github.com> Date: Sun, 5 Jul 2026 23:49:17 +0530 Subject: [PATCH] test: assert cephfs CSI directory removal in cleanCSIDirs test Test_cleanCSIDirs created both the rbd and cephfs CSI driver directories but only ever checked that the rbd directory was removed. The second os.Stat call re-checked rbdDriverDir instead of cephFSDriverDir, so removal of the cephfs CSI directory by cleanCSIDirs was never verified even though the test set it up for exactly that purpose. Point the second assertion at cephFSDriverDir so both directories that cleanCSIDirs is expected to remove are actually asserted. Signed-off-by: Anas Khan <83116240+anxkhn@users.noreply.github.com> --- pkg/daemon/ceph/cleanup/hostpath_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/daemon/ceph/cleanup/hostpath_test.go b/pkg/daemon/ceph/cleanup/hostpath_test.go index 91a34a724..2c0a8e62f 100644 --- a/pkg/daemon/ceph/cleanup/hostpath_test.go +++ b/pkg/daemon/ceph/cleanup/hostpath_test.go @@ -41,7 +41,7 @@ func Test_cleanCSIDirs(t *testing.T) { _, err = os.Stat(rbdDriverDir) assert.True(t, os.IsNotExist(err)) - _, err = os.Stat(rbdDriverDir) + _, err = os.Stat(cephFSDriverDir) assert.True(t, os.IsNotExist(err)) }