# 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
{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):
"""
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("""