summaryrefslogtreecommitdiffstats
path: root/tests/functional/heketi
diff options
context:
space:
mode:
authorvamahaja <vamahaja@redhat.com>2020-07-14 12:28:53 +0530
committervamahaja <vamahaja@redhat.com>2020-07-14 13:20:59 +0530
commit95cb4148c9ec90d7315a9eb6172751b8b909362f (patch)
treef0eb363d4dd397a71f4d6a68db0f0b62ece19d42 /tests/functional/heketi
parent6260a8e33244b59ee37d0072f2eae41328134163 (diff)
[TestFix] Fix pytest warnings
Fix consists of - 1. Remove depricated method 'assertEquals'. 2. Add 'junit_family=legacy' to pytest.ini to keep using the legacy version for JUnit XML file. 3. Prepend 'r' for regular expression. Change-Id: I9a804bba3590e33b50aa0c88ded9cf0007afe1e6 Signed-off-by: vamahaja <vamahaja@redhat.com>
Diffstat (limited to 'tests/functional/heketi')
-rw-r--r--tests/functional/heketi/test_heketi_node_operations.py2
-rw-r--r--tests/functional/heketi/test_restart_heketi_pod.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/functional/heketi/test_heketi_node_operations.py b/tests/functional/heketi/test_heketi_node_operations.py
index 1f5e2b04..387bfae4 100644
--- a/tests/functional/heketi/test_heketi_node_operations.py
+++ b/tests/functional/heketi/test_heketi_node_operations.py
@@ -680,7 +680,7 @@ class TestHeketiNodeOperations(baseclass.BaseClass):
for vol in vol_list:
vol_info = h.heketi_volume_expand(
h_node, h_url, vol['id'], '1', json=True)
- self.assertEquals(2, vol_info['size'])
+ self.assertEqual(2, vol_info['size'])
else:
msg = "Invalid vol_operation %s" % vol_operation
diff --git a/tests/functional/heketi/test_restart_heketi_pod.py b/tests/functional/heketi/test_restart_heketi_pod.py
index a6c973ec..d88080c2 100644
--- a/tests/functional/heketi/test_restart_heketi_pod.py
+++ b/tests/functional/heketi/test_restart_heketi_pod.py
@@ -93,7 +93,7 @@ class TestRestartHeketi(BaseClass):
# Read Heketi secret data
self.node = self.ocp_master_node[0]
heketi_secret_data_str_base64 = oc_get_custom_resource(
- self.node, "secret", ":.data.'heketi\.json'", # noqa
+ self.node, "secret", r":.data.'heketi\.json'", # noqa
name=heketi_secret_name)[0]
heketi_secret_data_str = self.cmd_run(
"echo %s | base64 -d" % heketi_secret_data_str_base64)