From: Xiubo Li Date: Thu, 16 Apr 2020 02:53:23 +0000 (-0400) Subject: qa/volume_client: fix TestVolumeClient failing under new py3 runtime X-Git-Tag: v16.1.0~2504^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0ed507dfd4dd1e38c358cd6c77f20fac6e3a8343;p=ceph.git qa/volume_client: fix TestVolumeClient failing under new py3 runtime 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 --- 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 index a602a0353e75..000000000000 --- a/qa/suites/fs/basic_functional/tasks/volume-client/py/.qa +++ /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 index e3924dd6be41..000000000000 --- a/qa/suites/fs/basic_functional/tasks/volume-client/py/2.yaml +++ /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 index 9bd4a922626c..000000000000 --- a/qa/suites/fs/basic_functional/tasks/volume-client/py/3.yaml +++ /dev/null @@ -1,2 +0,0 @@ -overrides: - python: python3 diff --git a/qa/tasks/cephfs/test_volume_client.py b/qa/tasks/cephfs/test_volume_client.py index 470e63d09fa1..263731658e67 100644 --- a/qa/tasks/cephfs/test_volume_client.py +++ b/qa/tasks/cephfs/test_volume_client.py @@ -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("""