Skip to content

Commit

Permalink
Add a test for TimeoutInMinutes accepting a str int
Browse files Browse the repository at this point in the history
The nested stack resource should accept a number as a string
for TimeoutInMinutes.
The actual fix has been fixed by: https://review.openstack.org/#/c/52564/
but this just proves it.

Change-Id: I769a34eb536177b405a585158df383bbd3021cf9
Partial-bug: #1240903
  • Loading branch information
asalkeld committed Oct 19, 2013
1 parent 4d4be74 commit a5e156f
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions heat/tests/test_nested_stack.py
Expand Up @@ -14,6 +14,7 @@


import copy
import json

from oslo.config import cfg

Expand Down Expand Up @@ -109,6 +110,20 @@ def test_nested_stack_create(self):

self.m.VerifyAll()

def test_nested_stack_create_with_timeout(self):
urlfetch.get('https://server.test/the.template').MultipleTimes().\
AndReturn(self.nested_template)
self.m.ReplayAll()

timeout_template = template_format.parse(
copy.deepcopy(self.test_template))
props = timeout_template['Resources']['the_nested']['Properties']
props['TimeoutInMinutes'] = '50'

stack = self.create_stack(json.dumps(timeout_template))
self.assertEquals(stack.state, (stack.CREATE, stack.COMPLETE))
self.m.VerifyAll()

def test_nested_stack_create_exceeds_resource_limit(self):
cfg.CONF.set_override('max_resources_per_stack', 1)
resource._register_class('GenericResource',
Expand Down

0 comments on commit a5e156f

Please sign in to comment.