Improve StackValidationFailed exception
We use StackValidationFailed in many different scenarios and
the the message is at times extremely unhelpful, specifically
when the validation error is deep in a nested stack.
Change-Id: I0183bdf81442e62325a427b4eec5c4cd9b7cb91f
Closes-Bug: #1686360
diff --git a/functional/test_resource_group.py b/functional/test_resource_group.py
index 8d8cc89..3f47ca5 100644
--- a/functional/test_resource_group.py
+++ b/functional/test_resource_group.py
@@ -82,7 +82,9 @@
# Prove validation works for non-zero create/update
template_two_nested = self.template.replace("count: 0", "count: 2")
- expected_err = "Value 'BAD' is not an integer"
+ expected_err = ("resources.random_group<nested_stack>.resources."
+ "0<provider.yaml>.resources.random: : "
+ "Value 'BAD' is not an integer")
ex = self.assertRaises(exc.HTTPBadRequest, self.update_stack,
stack_identifier, template_two_nested,
environment=env, files=files)