Update error messages in sanity tests
Update error messages throughout sanity tests
to use the same (or similar) format of error message.
Change-Id: I4db0517a5b264151ddaa6ea2c2a04d37e139944e
Related-PROD: #PROD-32415
diff --git a/test_set/cvp-sanity/tests/test_mounts.py b/test_set/cvp-sanity/tests/test_mounts.py
index dfb67e9..cc6f201 100644
--- a/test_set/cvp-sanity/tests/test_mounts.py
+++ b/test_set/cvp-sanity/tests/test_mounts.py
@@ -9,8 +9,9 @@
# Get all mount points from each node in the group with the next command: `df -h | awk '{print $1}'`
# Check that all mount points are similar for each node in the group
"""
+ group, nodes = nodes_in_group
exclude_mounts = 'grep -v "overlay\|tmpfs\|shm\|Filesystem"'
- mounts_by_nodes = local_salt_client.cmd(tgt="L@"+','.join(nodes_in_group),
+ mounts_by_nodes = local_salt_client.cmd(tgt="L@"+','.join(nodes),
param="df -h | awk '{print $1}'" +
" |" + exclude_mounts,
expr_form='compound')
@@ -46,6 +47,7 @@
if not result:
pytest.skip("These nodes are skipped")
- assert len(set(result.values())) == 1,\
- "The nodes in the same group have different mounts:\n{}".format(
- json.dumps(pretty_result, indent=4))
+ assert len(set(result.values())) == 1, (
+ "Nodes in '{}' group have different mounts:\n{}".format(
+ group, json.dumps(pretty_result, indent=4))
+ )