]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
qa/cephfs: Add test case for enctag too long
authorChristopher Hoffman <choffman@redhat.com>
Wed, 20 Aug 2025 19:57:39 +0000 (19:57 +0000)
committerChristopher Hoffman <choffman@redhat.com>
Mon, 22 Sep 2025 14:33:28 +0000 (14:33 +0000)
Signed-off-by: Christopher Hoffman <choffman@redhat.com>
(cherry picked from commit a33e21e08fa08e4859c4c4c45a3eb02ab9fd730f)
Resolves: rhbz#2359400

qa/tasks/cephfs/test_volumes.py

index bbac6ba1c34d2f901c9d8b20693703e2580c8bcd..3ad41319215770ad8c14869306b265bbacb65add 100644 (file)
@@ -2899,6 +2899,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)
 
@@ -2916,6 +2921,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)