Make StackResource less strict on initial validation
When doing the initial validate(), skip validating values by setting
the stack strict_validate to False, otherwise we incorrectly fail
validation when values are passed in via properties/parameters which
refer to resources in the parent stack.
Co-Authored-by: Angus Salkeld <asalkeld@mirantis.com>
Change-Id: Ib75c2de6c32373de72901b9f7c5e3828bd9ee7d9
Closes-Bug: #1407100
Closes-Bug: #1407877
Closes-Bug: #1405446
diff --git a/common/test.py b/common/test.py
index 3de44f5..450ed82 100644
--- a/common/test.py
+++ b/common/test.py
@@ -331,7 +331,8 @@
return dict((r.resource_name, r.resource_type) for r in resources)
def stack_create(self, stack_name=None, template=None, files=None,
- parameters=None, environment=None):
+ parameters=None, environment=None,
+ expected_status='CREATE_COMPLETE'):
name = stack_name or self._stack_rand_name()
templ = template or self.template
templ_files = files or {}
@@ -349,5 +350,5 @@
stack = self.client.stacks.get(name)
stack_identifier = '%s/%s' % (name, stack.id)
- self._wait_for_stack_status(stack_identifier, 'CREATE_COMPLETE')
+ self._wait_for_stack_status(stack_identifier, expected_status)
return stack_identifier