diff options
author | kairat_kushaev <kkushaev@mirantis.com> | 2015-07-31 16:22:45 +0300 |
---|---|---|
committer | kairat_kushaev <kkushaev@mirantis.com> | 2015-08-04 12:22:50 +0300 |
commit | e129fce770480398f99792c320f85d1d32d5392a (patch) | |
tree | 19bf07114364209d2f2f72a702e27b9fd4ce6a2d | |
parent | 2bf2efd6ad1211075e0c3a4d760179f757ad3e98 (diff) | |
download | heat-e129fce770480398f99792c320f85d1d32d5392a.tar.gz |
Add test for template resource suspend/resume
Add functional test that executes the following scenario:
- suspend a stack with template resource
- resume a stack with template resource.
Change-Id: I7e1ff7785f48d861752d681d26866c985b8c8513
Closes-bug: #1479595
-rw-r--r-- | heat_integrationtests/functional/test_template_resource.py | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/heat_integrationtests/functional/test_template_resource.py b/heat_integrationtests/functional/test_template_resource.py index 00e08b0e5..478cfae5a 100644 --- a/heat_integrationtests/functional/test_template_resource.py +++ b/heat_integrationtests/functional/test_template_resource.py @@ -687,3 +687,36 @@ Resources: exp = 'Resource CREATE failed: ValueError: %s: %s' % (exp_path, exp_msg) self.assertEqual(exp, stack.stack_status_reason) + + +class TemplateResourceSuspendResumeTest(test.HeatIntegrationTest): + """Prove that we can do template resource suspend/resume.""" + + main_template = ''' +heat_template_version: 2014-10-16 +parameters: +resources: + the_nested: + type: the.yaml +''' + + nested_templ = ''' +heat_template_version: 2014-10-16 +resources: + test_random_string: + type: OS::Heat::RandomString +''' + + def setUp(self): + super(TemplateResourceSuspendResumeTest, self).setUp() + self.client = self.orchestration_client + + def test_suspend_resume(self): + """Basic test for template resource suspend resume""" + stack_identifier = self.stack_create( + template=self.main_template, + files={'the.yaml': self.nested_templ} + ) + + self.stack_suspend(stack_identifier=stack_identifier) + self.stack_resume(stack_identifier=stack_identifier) |