Zane Bitter | d075e22 | 2016-09-22 09:44:56 -0400 | [diff] [blame] | 1 | # Licensed under the Apache License, Version 2.0 (the "License"); you may |
| 2 | # not use this file except in compliance with the License. You may obtain |
| 3 | # a copy of the License at |
| 4 | # |
| 5 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 6 | # |
| 7 | # Unless required by applicable law or agreed to in writing, software |
| 8 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 9 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 10 | # License for the specific language governing permissions and limitations |
| 11 | # under the License. |
| 12 | |
| 13 | import time |
| 14 | |
| 15 | from heat_integrationtests.functional import functional_base |
| 16 | |
| 17 | |
| 18 | class DeleteInProgressTest(functional_base.FunctionalTestsBase): |
| 19 | |
| 20 | root_template = ''' |
| 21 | heat_template_version: 2013-05-23 |
| 22 | resources: |
| 23 | rg: |
| 24 | type: OS::Heat::ResourceGroup |
| 25 | properties: |
| 26 | count: 125 |
| 27 | resource_def: |
| 28 | type: empty.yaml |
| 29 | ''' |
| 30 | |
| 31 | empty_template = ''' |
| 32 | heat_template_version: 2013-05-23 |
| 33 | resources: |
| 34 | ''' |
| 35 | |
| 36 | def test_delete_nested_stacks_create_in_progress(self): |
| 37 | files = {'empty.yaml': self.empty_template} |
| 38 | identifier = self.stack_create(template=self.root_template, |
| 39 | files=files, |
| 40 | expected_status='CREATE_IN_PROGRESS') |
| 41 | time.sleep(20) |
| 42 | self._stack_delete(identifier) |