Add more information to BuildErrorException
This commit adds expected_status to BuildErrorException. This is helpful
for checking the error details.
Change-Id: I2979d39467daeb06793081b83e3a5b81b7d5623e
Closes-bug: #1265559
diff --git a/tempest/scenario/manager.py b/tempest/scenario/manager.py
index 59a3aeb..4937a4e 100644
--- a/tempest/scenario/manager.py
+++ b/tempest/scenario/manager.py
@@ -395,8 +395,9 @@
# so case sensitive comparisons can really mess things
# up.
if new_status.lower() == error_status.lower():
- message = ("%s failed to get to expected status. "
- "In %s state.") % (thing, new_status)
+ message = ("%s failed to get to expected status (%s). "
+ "In %s state.") % (thing, expected_status,
+ new_status)
raise exceptions.BuildErrorException(message,
server_id=thing_id)
elif new_status == expected_status and expected_status is not None: