From: Christopher Hoffman Date: Wed, 20 Aug 2025 19:57:39 +0000 (+0000) Subject: qa/cephfs: Add test case for enctag too long X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=91a547398b047df4e799790c0cfa86def20462e9;p=ceph.git qa/cephfs: Add test case for enctag too long Signed-off-by: Christopher Hoffman --- diff --git a/qa/tasks/cephfs/test_volumes.py b/qa/tasks/cephfs/test_volumes.py index 7ac614ca711..b427d973523 100644 --- a/qa/tasks/cephfs/test_volumes.py +++ b/qa/tasks/cephfs/test_volumes.py @@ -3052,6 +3052,11 @@ class TestSubvolumes(TestVolumesHelper): def test_subvolume_create_with_enctag(self): # create subvolume with enctag subvolume = self._gen_subvol_name() + enctag_error = "a" * 256 #expect a failure since length is too long + + with self.assertRaises(CommandFailedError): + self._fs_cmd("subvolume", "create", self.volname, subvolume, "--enctag", enctag_error) + enctag = "tag1" self._fs_cmd("subvolume", "create", self.volname, subvolume, "--enctag", enctag) @@ -3069,6 +3074,10 @@ class TestSubvolumes(TestVolumesHelper): self._fs_cmd("subvolume", "create", self.volname, subvolume) # set enctag + enctag_error = "b" * 256 #expect a failure since lenght is too long + with self.assertRaises(CommandFailedError): + self._fs_cmd("subvolume", "enctag", "set", self.volname, subvolume, "--enctag", enctag_error) + enctag = "tag2" self._fs_cmd("subvolume", "enctag", "set", self.volname, subvolume, "--enctag", enctag)