From 5fe05c3d09126453423a3d2ee97a4586ec6592c1 Mon Sep 17 00:00:00 2001 From: Valerii Ponomarov Date: Thu, 21 Mar 2019 16:04:57 +0530 Subject: Add py3 support to our tox config and fix several incompatibilities Required steps to run test cases using py3: 1) Install py3 2) Install 'tox' package using "pip3" 3) Run test cases using tox package installed via pip3 Note that full py3 support is not tested yet. It only allows you to run it on py3 not providing any guarantees. Example: $ python3 -m tox -e functional3 -- \ glusto -c /path/to/the/config/file.yaml \ '--pytest=-v -rsx tests -k test_glusterblock_logs' Change-Id: I610faac0b75364c401734b6f892649893ca2320e --- tests/functional/heketi/test_volume_multi_req.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'tests/functional/heketi/test_volume_multi_req.py') diff --git a/tests/functional/heketi/test_volume_multi_req.py b/tests/functional/heketi/test_volume_multi_req.py index 3445a8a4..9fcaeb49 100644 --- a/tests/functional/heketi/test_volume_multi_req.py +++ b/tests/functional/heketi/test_volume_multi_req.py @@ -219,7 +219,7 @@ class TestVolumeMultiReq(BaseClass): 'wait for volume count to settle timed out') def _count_vols(self): - ocp_node = g.config['ocp_servers']['master'].keys()[0] + ocp_node = list(g.config['ocp_servers']['master'].keys())[0] return len(_heketi_vols(ocp_node, self.heketi_server_url)) def test_simple_serial_vol_create(self): @@ -229,7 +229,7 @@ class TestVolumeMultiReq(BaseClass): # TODO A nice thing to add to this test would be to also verify # the gluster volumes also exist. tname = make_unique_label(extract_method_name(self.id())) - ocp_node = g.config['ocp_servers']['master'].keys()[0] + ocp_node = list(g.config['ocp_servers']['master'].keys())[0] # deploy a temporary storage class sc = build_storage_class( name=tname, @@ -290,7 +290,7 @@ class TestVolumeMultiReq(BaseClass): """ self.addCleanup(self.wait_to_settle) tname = make_unique_label(extract_method_name(self.id())) - ocp_node = g.config['ocp_servers']['master'].keys()[0] + ocp_node = list(g.config['ocp_servers']['master'].keys())[0] # deploy a temporary storage class sc = build_storage_class( name=tname, @@ -345,7 +345,7 @@ class TestVolumeMultiReq(BaseClass): """ self.addCleanup(self.wait_to_settle) tname = make_unique_label(extract_method_name(self.id())) - ocp_node = g.config['ocp_servers']['master'].keys()[0] + ocp_node = list(g.config['ocp_servers']['master'].keys())[0] # deploy a temporary storage class sc = build_storage_class( name=tname, @@ -389,7 +389,7 @@ class TestVolumeMultiReq(BaseClass): """ self.addCleanup(self.wait_to_settle) tname = make_unique_label(extract_method_name(self.id())) - ocp_node = g.config['ocp_servers']['master'].keys()[0] + ocp_node = list(g.config['ocp_servers']['master'].keys())[0] # deploy a temporary storage class sc = build_storage_class( name=tname, -- cgit