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_cinder_services.py b/test_set/cvp-sanity/tests/test_cinder_services.py
index a612bca..9e13e36 100644
--- a/test_set/cvp-sanity/tests/test_cinder_services.py
+++ b/test_set/cvp-sanity/tests/test_cinder_services.py
@@ -13,8 +13,9 @@
service_down = local_salt_client.cmd_any(
tgt='keystone:server',
param='. /root/keystonercv3; cinder service-list | grep "down\|disabled"')
- assert service_down == '', \
- '''Some cinder services are in wrong state'''
+ assert service_down == '', (
+ "Some Cinder services are in wrong state:\n{}".format(service_down))
+
@pytest.mark.full
def test_cinder_services_has_all_backends(local_salt_client, check_cinder_backends):
@@ -30,7 +31,7 @@
tgt='keystone:server',
param='. /root/keystonercv3; cinder service-list | grep "volume" |grep -c -v -e "lvm"')
backends_num = len(backends_cinder.keys())
- assert cinder_volume == str(backends_num), \
- 'Number of cinder-volume services ({0}) does not match ' \
- 'number of volume backends ({1})'.format(
- cinder_volume, str(backends_num))
+ assert cinder_volume == str(backends_num), (
+ 'Number of cinder-volume services ({0}) does not match number of '
+ 'volume backends ({1}).'.format(cinder_volume, str(backends_num))
+ )