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_ntp_sync.py b/test_set/cvp-sanity/tests/test_ntp_sync.py
index 6751f1a..21528ca 100644
--- a/test_set/cvp-sanity/tests/test_ntp_sync.py
+++ b/test_set/cvp-sanity/tests/test_ntp_sync.py
@@ -25,8 +25,10 @@
result[time].sort()
else:
result[time] = [node]
- assert len(result) <= 1, 'Not all nodes have the same time:\n {}'.format(
- json.dumps(result, indent=4))
+ assert len(result) <= 1, (
+ 'Time is out of sync on the following nodes:\n{}'.format(
+ json.dumps(result, indent=4))
+ )
@pytest.mark.smoke
@@ -61,6 +63,7 @@
sys_peer_declared = True
if not sys_peer_declared:
final_result[node] = ntpq_output
- assert not final_result,\
- "NTP peers state is not expected on some nodes, could not find " \
+ assert not final_result, (
+ "NTP peers state is not as expected on some nodes; could not find "
"declared system peer:\n{}".format(json.dumps(final_result, indent=4))
+ )