summaryrefslogtreecommitdiff
path: root/heat_integrationtests/functional/test_template_resource.py
diff options
context:
space:
mode:
authorkairat_kushaev <kkushaev@mirantis.com>2015-07-31 16:22:45 +0300
committerkairat_kushaev <kkushaev@mirantis.com>2015-08-04 12:22:50 +0300
commite129fce770480398f99792c320f85d1d32d5392a (patch)
tree19bf07114364209d2f2f72a702e27b9fd4ce6a2d /heat_integrationtests/functional/test_template_resource.py
parent2bf2efd6ad1211075e0c3a4d760179f757ad3e98 (diff)
downloadheat-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
Diffstat (limited to 'heat_integrationtests/functional/test_template_resource.py')
-rw-r--r--heat_integrationtests/functional/test_template_resource.py33
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)