blob: 0cf2f81b2802434407da184f804d7003f8459d7e [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
Rabi Mishra477efc92015-07-31 13:01:45 +053014from heat_integrationtests.functional import functional_base
Pratik Mallyad3f74712015-07-15 10:53:48 -050015
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
Rabi Mishra477efc92015-07-31 13:01:45 +053034class SwiftSignalHandleUpdateTest(functional_base.FunctionalTestsBase):
Pratik Mallyad3f74712015-07-15 10:53:48 -050035
Pratik Mallyad3f74712015-07-15 10:53:48 -050036 def test_stack_update_same_template_replace_no_url(self):
37 stack_identifier = self.stack_create(template=test_template)
38 stack = self.client.stacks.get(stack_identifier)
39 orig_url = self._stack_output(stack, 'signal_url')
40 orig_curl = self._stack_output(stack, 'signal_curl')
41 self.update_stack(stack_identifier, test_template)
42 stack = self.client.stacks.get(stack_identifier)
43 self.assertEqual(orig_url, self._stack_output(stack, 'signal_url'))
44 self.assertEqual(orig_curl, self._stack_output(stack, 'signal_curl'))