From: Kotresh HR Date: Wed, 2 Aug 2023 12:11:51 +0000 (+0530) Subject: qa: Add testcase for pending_subvolume_deletions count X-Git-Tag: v19.0.0~709^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8b1303f4b1d740eb6a73a7be54294e346def7b60;p=ceph.git qa: Add testcase for pending_subvolume_deletions count Fixes: https://tracker.ceph.com/issues/62278 Signed-off-by: Kotresh HR --- diff --git a/qa/tasks/cephfs/test_volumes.py b/qa/tasks/cephfs/test_volumes.py index f5f5c15fba1..da6f22696b6 100644 --- a/qa/tasks/cephfs/test_volumes.py +++ b/qa/tasks/cephfs/test_volumes.py @@ -649,6 +649,22 @@ class TestVolumes(TestVolumesHelper): self.assertEqual(vol_info["used_size"], 0, "Size should be zero when volumes directory is empty") + def test_volume_info_pending_subvol_deletions(self): + """ + Tests the pending_subvolume_deletions in 'fs volume info' command + """ + subvolname = self._generate_random_subvolume_name() + # create subvolume + self._fs_cmd("subvolume", "create", self.volname, subvolname, "--mode=777") + # create 3K files of 0.1MB + self._do_subvolume_io(subvolname, number_of_files=3000, file_size=0.1) + # Delete the subvolume + self._fs_cmd("subvolume", "rm", self.volname, subvolname) + # get volume metadata + vol_info = json.loads(self._get_volume_info(self.volname)) + self.assertNotEqual(vol_info['pending_subvolume_deletions'], 0, + "pending_subvolume_deletions should be 1") + def test_volume_info_without_subvolumegroup(self): """ Tests the 'fs volume info' command without subvolume group