diff options
author | Angus Salkeld <asalkeld@mirantis.com> | 2015-04-01 11:22:40 +1000 |
---|---|---|
committer | Angus Salkeld <asalkeld@mirantis.com> | 2015-04-01 11:22:40 +1000 |
commit | bafb803a7fb4d00602fa373de222da7e79272311 (patch) | |
tree | e613bb82b13dc56155320da5a1db278baae5af7a | |
parent | 7541cacfdd6289988925c5683451f497709e9c67 (diff) | |
download | heat-bafb803a7fb4d00602fa373de222da7e79272311.tar.gz |
Prove that we can't signal during a suspend
This is to just make sure that bug 1334333 is fixed.
Change-Id: I7a54e7f089b247997fb5cc5e696629f6415d009f
Partial-bug: #1334333
-rw-r--r-- | heat_integrationtests/functional/test_autoscaling.py | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/heat_integrationtests/functional/test_autoscaling.py b/heat_integrationtests/functional/test_autoscaling.py index d64091589..cbb0fec23 100644 --- a/heat_integrationtests/functional/test_autoscaling.py +++ b/heat_integrationtests/functional/test_autoscaling.py @@ -720,3 +720,31 @@ outputs: self.assertTrue(test.call_until_true( self.build_timeout, self.build_interval, self.check_instance_count, stack_identifier, 5)) + + def test_signal_during_suspend(self): + """Prove that a signal will fail when the stack is in suspend.""" + + stack_identifier = self.stack_create(template=self.template, + files=self.files, + environment=self.env) + + self.assertTrue(test.call_until_true( + self.build_timeout, self.build_interval, + self.check_instance_count, stack_identifier, 2)) + + nested_ident = self.assert_resource_is_a_stack(stack_identifier, + 'JobServerGroup') + + # suspend the top level stack. + self.client.actions.suspend(stack_id=stack_identifier) + self._wait_for_resource_status( + stack_identifier, 'JobServerGroup', 'SUSPEND_COMPLETE') + + # Send a signal and confirm nothing happened. + self.client.resources.signal(stack_identifier, 'ScaleUpPolicy') + # still SUSPEND_COMPLETE (not gone to UPDATE_COMPLETE) + self._wait_for_stack_status(nested_ident, 'SUSPEND_COMPLETE') + # still 2 instances. + self.assertTrue(test.call_until_true( + self.build_timeout, self.build_interval, + self.check_instance_count, stack_identifier, 2)) |