| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 import time | 2 import time |
| 3 import json | 3 import json |
| 4 | 4 |
| 5 from tests.unit import unittest | 5 from tests.unit import unittest |
| 6 from boto.cloudformation.connection import CloudFormationConnection | 6 from boto.cloudformation.connection import CloudFormationConnection |
| 7 | 7 |
| 8 | 8 |
| 9 BASIC_EC2_TEMPLATE = { | 9 BASIC_EC2_TEMPLATE = { |
| 10 "AWSTemplateFormatVersion": "2010-09-09", | 10 "AWSTemplateFormatVersion": "2010-09-09", |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 self.connection = CloudFormationConnection() | 98 self.connection = CloudFormationConnection() |
| 99 self.stack_name = 'testcfnstack' + str(int(time.time())) | 99 self.stack_name = 'testcfnstack' + str(int(time.time())) |
| 100 | 100 |
| 101 def test_large_template_stack_size(self): | 101 def test_large_template_stack_size(self): |
| 102 # See https://github.com/boto/boto/issues/1037 | 102 # See https://github.com/boto/boto/issues/1037 |
| 103 body = self.connection.create_stack( | 103 body = self.connection.create_stack( |
| 104 self.stack_name, | 104 self.stack_name, |
| 105 template_body=json.dumps(BASIC_EC2_TEMPLATE)) | 105 template_body=json.dumps(BASIC_EC2_TEMPLATE)) |
| 106 self.addCleanup(self.connection.delete_stack, self.stack_name) | 106 self.addCleanup(self.connection.delete_stack, self.stack_name) |
| 107 | 107 |
| 108 # A newly created stack should have events |
| 109 events = self.connection.describe_stack_events(self.stack_name) |
| 110 self.assertTrue(events) |
| 111 |
| 112 # No policy should be set on the stack by default |
| 113 policy = self.connection.get_stack_policy(self.stack_name) |
| 114 self.assertEqual(None, policy) |
| 115 |
| 116 # Our new stack should show up in the stack list |
| 117 stacks = self.connection.describe_stacks() |
| 118 self.assertEqual(self.stack_name, stacks[0].stack_name) |
| 119 |
| 108 | 120 |
| 109 if __name__ == '__main__': | 121 if __name__ == '__main__': |
| 110 unittest.main() | 122 unittest.main() |
| OLD | NEW |