blob: 9e656b10485d8ded1ca9399186fa618846055a57 [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):
Thomas Hervedb36c092017-03-23 11:20:14 +010037 if not self.is_service_available('object-store'):
38 self.skipTest('object-store service not available, skipping')
Pratik Mallyad3f74712015-07-15 10:53:48 -050039 stack_identifier = self.stack_create(template=test_template)
40 stack = self.client.stacks.get(stack_identifier)
41 orig_url = self._stack_output(stack, 'signal_url')
42 orig_curl = self._stack_output(stack, 'signal_curl')
43 self.update_stack(stack_identifier, test_template)
44 stack = self.client.stacks.get(stack_identifier)
45 self.assertEqual(orig_url, self._stack_output(stack, 'signal_url'))
46 self.assertEqual(orig_curl, self._stack_output(stack, 'signal_curl'))