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_nova_services.py b/test_set/cvp-sanity/tests/test_nova_services.py
index 54ed76e..a6fe959 100644
--- a/test_set/cvp-sanity/tests/test_nova_services.py
+++ b/test_set/cvp-sanity/tests/test_nova_services.py
@@ -10,8 +10,8 @@
param='. /root/keystonercv3;'
'nova service-list | grep "down\|disabled" | grep -v "Forced down"')
- assert result == '', \
- '''Some nova services are in wrong state'''
+ assert result == '', (
+ "Some Nova services are in wrong state:\n{}".format(result))
@pytest.mark.smoke
@@ -34,9 +34,11 @@
param='. /root/keystonercv3;'
'openstack hypervisor list | egrep -v "\-----|ID" | wc -l')
- assert all_cmp_services == hypervisors, \
- "Number of nova-compute services ({}) does not match number of " \
+ assert all_cmp_services == hypervisors, (
+ "Number of nova-compute services ({}) does not match number of "
"hypervisors ({}).".format(all_cmp_services, hypervisors)
- assert enabled_cmp_services == hosts, \
- "Number of enabled nova-compute services ({}) does not match number \
- of hosts ({}).".format(enabled_cmp_services, hosts)
+ )
+ assert enabled_cmp_services == hosts, (
+ "Number of enabled nova-compute services ({}) does not match number "
+ "of hosts ({}).".format(enabled_cmp_services, hosts)
+ )