]> git.apps.os.sepia.ceph.com Git - ceph.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>
Wed, 5 Nov 2025 13:59:36 +0000 (13:59 +0000)
Signed-off-by: Christopher Hoffman <choffman@redhat.com>
qa/tasks/cephfs/test_volumes.py

index 7ac614ca71114cf863b227d3bd6079afb912dc33..b427d9735234c56469fdb3eb5ac6e84c08bab455 100644 (file)
@@ -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)