blob: 0f1c43c13989fcc17c8ee6405ffdee9e16527064 [file] [log] [blame]
Pratik Mallyad3f74712015-07-15 10:53:48 -05001# 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
14from heat_integrationtests.common import test
15
16test_template = '''
17heat_template_version: 2014-10-16
18
19resources:
20 signal_handle:
21 type: "OS::Heat::SwiftSignalHandle"
22
23outputs:
24 signal_curl:
25 value: { get_attr: ['signal_handle', 'curl_cli'] }
26 description: Swift signal cURL
27
28 signal_url:
29 value: { get_attr: ['signal_handle', 'endpoint'] }
30 description: Swift signal URL
31'''
32
33
34class SwiftSignalHandleUpdateTest(test.HeatIntegrationTest):
35
36 def setUp(self):
37 super(SwiftSignalHandleUpdateTest, self).setUp()
38 self.client = self.orchestration_client
39
40 def test_stack_update_same_template_replace_no_url(self):
41 stack_identifier = self.stack_create(template=test_template)
42 stack = self.client.stacks.get(stack_identifier)
43 orig_url = self._stack_output(stack, 'signal_url')
44 orig_curl = self._stack_output(stack, 'signal_curl')
45 self.update_stack(stack_identifier, test_template)
46 stack = self.client.stacks.get(stack_identifier)
47 self.assertEqual(orig_url, self._stack_output(stack, 'signal_url'))
48 self.assertEqual(orig_curl, self._stack_output(stack, 'signal_curl'))