]> git-server-git.apps.pok.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)
committerXiubo Li <xiubli@redhat.com>
Mon, 20 Apr 2020 11:04:52 +0000 (07:04 -0400)
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>
qa/suites/fs/basic_functional/tasks/volume-client/py/.qa [deleted symlink]
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/.qa b/qa/suites/fs/basic_functional/tasks/volume-client/py/.qa
deleted file mode 120000 (symlink)
index a602a03..0000000
+++ /dev/null
@@ -1 +0,0 @@
-../.qa/
\ No newline at end of file
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 470e63d09fa1710e18bdd4eb88d39d993f8fad8c..263731658e67b9791049b653f5c8272a85bcb0d1 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('python3', 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):
         """
@@ -654,12 +647,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("""