From: Rishabh Dave Date: Wed, 16 Apr 2025 08:47:18 +0000 (+0530) Subject: qa/cephfs: test that user created pool is not deleted by... X-Git-Tag: testing/wip-rishabh-testing-20250422.155049-debug~2^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=ad1716ff15743dc45d88ddb529b4705b6bd780a6;p=ceph-ci.git qa/cephfs: test that user created pool is not deleted by... "volume create" command. Signed-off-by: Rishabh Dave --- diff --git a/qa/tasks/cephfs/test_volumes.py b/qa/tasks/cephfs/test_volumes.py index 489bf4b6f53..9ef6c26f33f 100644 --- a/qa/tasks/cephfs/test_volumes.py +++ b/qa/tasks/cephfs/test_volumes.py @@ -808,6 +808,28 @@ class TestVolumeCreate(TestVolumesHelper): self.run_ceph_cmd(f'osd pool rm {data} {data} ' '--yes-i-really-really-mean-it') + def test_user_created_pool_isnt_deleted(self): + ''' + Test that the user created pool is not deleted by this commmand if it + has been passed to it along with a non-existent pool name. + ''' + data_pool = 'cephfs.b.data' + non_existent_meta_pool = 'nonexistent-pool' + + self.run_ceph_cmd(f'osd pool create {data_pool}') + o = self.get_ceph_cmd_stdout('osd pool ls') + self.assertIn(data_pool, o) + self.assertNotIn(non_existent_meta_pool, o) + + self.negtest_ceph_cmd( + args=f'fs volume create b --data-pool {data_pool} --meta-pool ' + f'{non_existent_meta_pool}', + retval=errno.ENOENT, + errmsgs=f'pool \'{non_existent_meta_pool}\' does not exist') + + o = self.get_ceph_cmd_stdout('osd pool ls') + self.assertIn(data_pool, o) + self.assertNotIn(non_existent_meta_pool, o) class TestRenameCmd(TestVolumesHelper):