diff options
Diffstat (limited to 'heat/tests/autoscaling/test_heat_scaling_policy.py')
-rw-r--r-- | heat/tests/autoscaling/test_heat_scaling_policy.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/heat/tests/autoscaling/test_heat_scaling_policy.py b/heat/tests/autoscaling/test_heat_scaling_policy.py index 13869b571..73f9b6f71 100644 --- a/heat/tests/autoscaling/test_heat_scaling_policy.py +++ b/heat/tests/autoscaling/test_heat_scaling_policy.py @@ -124,6 +124,17 @@ class TestAutoScalingPolicy(common.HeatTestCase): mock_cip.assert_called_once_with() self.assertEqual([], dont_call.call_args_list) + def test_policy_metadata_reset(self): + t = template_format.parse(as_template) + stack = utils.parse_stack(t, params=as_params) + pol = self.create_scaling_policy(t, stack, 'my-policy') + metadata = {'scaling_in_progress': True} + pol.metadata_set(metadata) + pol.handle_metadata_reset() + + new_metadata = pol.metadata_get() + self.assertEqual({'scaling_in_progress': False}, new_metadata) + def test_scaling_policy_cooldown_ok(self): t = template_format.parse(as_template) stack = utils.parse_stack(t, params=as_params) |