]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
tasks/cephfs: skip test_session_reject cleanly
authorJohn Spray <john.spray@redhat.com>
Thu, 1 Sep 2016 17:33:50 +0000 (18:33 +0100)
committerJohn Spray <john.spray@redhat.com>
Wed, 7 Dec 2016 00:45:45 +0000 (00:45 +0000)
Instead of asserting in configure_auth (which in fact
works fine with KernelMount.write_secret_file), raise
a SkipTest in test_session_reject (because the kernel
client cannot handle the client_metadata setting to
inject bogus data)

Signed-off-by: John Spray <john.spray@redhat.com>
tasks/cephfs/test_sessionmap.py

index eb46764c11d8f9f9cacdbe68a3c83e80f7e951ab..84abbaaf5663eed37e0f249c0f83cc5a0105a6b8 100644 (file)
@@ -1,6 +1,8 @@
 from StringIO import StringIO
 import json
 import logging
+from unittest import SkipTest
+
 from tasks.cephfs.fuse_mount import FuseMount
 from teuthology.exceptions import CommandFailedError
 from tasks.cephfs.cephfs_test_case import CephFSTestCase
@@ -192,9 +194,6 @@ class TestSessionMap(CephFSTestCase):
         for the client to use.
         """
 
-        # This keyring stuff won't work for kclient
-        assert(isinstance(mount, FuseMount))
-
         if osd_caps is None:
             osd_caps = "allow rw"
 
@@ -212,6 +211,9 @@ class TestSessionMap(CephFSTestCase):
         self.set_conf("client.{name}".format(name=id_name), "keyring", mount.get_keyring_path())
 
     def test_session_reject(self):
+        if not isinstance(self.mount_a, FuseMount):
+            raise SkipTest("Requires FUSE client to inject client metadata")
+
         self.mount_a.run_shell(["mkdir", "foo"])
         self.mount_a.run_shell(["mkdir", "foo/bar"])
         self.mount_a.umount_wait()