]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
qa/cephfs: update test_clone_failure_status_failed
authorRishabh Dave <ridave@redhat.com>
Mon, 31 Mar 2025 17:09:06 +0000 (22:39 +0530)
committerRishabh Dave <ridave@redhat.com>
Wed, 3 Dec 2025 07:51:56 +0000 (13:21 +0530)
This test constructs path to a specific snapshot. The code for this is
now outdated due to introduction of subvol v3. Update the code so that
the path is constructed correctly and the test can run successfully.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
qa/tasks/cephfs/test_volumes.py

index df7eb703c78f66f9819e5d06b03a09961daee057..dcade2a7ee5188df4eae458a85837ec5e2065d88 100644 (file)
@@ -8194,7 +8194,9 @@ class TestSubvolumeSnapshotClones(TestVolumesHelper):
         self._fs_cmd("subvolume", "snapshot", "clone", self.volname, subvolume, snapshot, clone1)
 
         # remove snapshot from backend to force the clone failure.
-        snappath = os.path.join(".", "volumes", "_nogroup", subvolume, ".snap", snapshot)
+        roots_dir = os.path.join(".", "volumes", "_nogroup", subvolume, "roots")
+        uuid = self.mount_a.get_shell_stdout(f'ls {roots_dir}').strip()
+        snappath = os.path.join(roots_dir, uuid, ".snap", snapshot)
         self.mount_a.run_shell(['sudo', 'rmdir', snappath], omit_sudo=False)
 
         # wait for clone1 to fail.