]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/volume_client: fix TestVolumeClient failing under new py3 runtime
authorXiubo Li <xiubli@redhat.com>
Thu, 16 Apr 2020 02:53:23 +0000 (22:53 -0400)
committerKefu Chai <kchai@redhat.com>
Wed, 3 Jun 2020 11:57:00 +0000 (19:57 +0800)
The pybind now has dropped the WITH_PYTHON2 option, and for now only
py3 supported.

Fixes: https://tracker.ceph.com/issues/45103
Signed-off-by: Xiubo Li <xiubli@redhat.com>
(cherry picked from commit 0ed507dfd4dd1e38c358cd6c77f20fac6e3a8343)

Conflicts:
qa/suites/fs/upgrade/snaps/clusters/.qa
qa/tasks/cephfs/test_volume_client.py: trivial resolution

qa/suites/fs/basic_functional/tasks/volume-client/py/2.yaml [deleted file]
qa/suites/fs/basic_functional/tasks/volume-client/py/3.yaml [deleted file]
qa/tasks/cephfs/test_volume_client.py

diff --git a/qa/suites/fs/basic_functional/tasks/volume-client/py/2.yaml b/qa/suites/fs/basic_functional/tasks/volume-client/py/2.yaml
deleted file mode 100644 (file)
index e3924dd..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-overrides:
-  python: python2
diff --git a/qa/suites/fs/basic_functional/tasks/volume-client/py/3.yaml b/qa/suites/fs/basic_functional/tasks/volume-client/py/3.yaml
deleted file mode 100644 (file)
index 9bd4a92..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-overrides:
-  python: python3
index 1997daa31c799cc35ada2cf3e44d2d6f032bb2ca..0dc279cf7b82444fd03fdc1f200519b483e0599d 100644 (file)
@@ -14,15 +14,9 @@ class TestVolumeClient(CephFSTestCase):
     # One for looking at the global filesystem, one for being
     # the VolumeClient, two for mounting the created shares
     CLIENTS_REQUIRED = 4
-    default_py_version = 'python3'
 
     def setUp(self):
         CephFSTestCase.setUp(self)
-        self.py_version = self.ctx.config.get('overrides', {}).\
-                          get('python', TestVolumeClient.default_py_version)
-        log.info("using python version: {python_version}".format(
-            python_version=self.py_version
-        ))
 
     def _volume_client_python(self, client, script, vol_prefix=None, ns_prefix=None):
         # Can't dedent this *and* the script we pass in, because they might have different
@@ -45,8 +39,7 @@ vc.connect()
 {payload}
 vc.disconnect()
         """.format(payload=script, conf_path=client.config_path,
-                   vol_prefix=vol_prefix, ns_prefix=ns_prefix),
-        self.py_version)
+                   vol_prefix=vol_prefix, ns_prefix=ns_prefix))
 
     def _configure_vc_auth(self, mount, id_name):
         """
@@ -688,12 +681,8 @@ vc.disconnect()
             guest_entity_2=guest_entity_2,
         )))
         # Check the list of authorized IDs and their access levels.
-        if self.py_version == 'python3':
-            expected_result = [('guest1', 'rw'), ('guest2', 'r')]
-            self.assertCountEqual(str(expected_result), auths)
-        else:
-            expected_result = [(u'guest1', u'rw'), (u'guest2', u'r')]
-            self.assertItemsEqual(str(expected_result), auths)
+        expected_result = [('guest1', 'rw'), ('guest2', 'r')]
+        self.assertCountEqual(str(expected_result), auths)
 
         # Disallow both the auth IDs' access to the volume.
         auths = self._volume_client_python(volumeclient_mount, dedent("""