Merge "Follow up I9b9e12335caebe27571088b90d529fc866227856" into mcp/xenial/rocky
diff --git a/heat_tempest_plugin/config.py b/heat_tempest_plugin/config.py
index c77bb51..5b9c10b 100644
--- a/heat_tempest_plugin/config.py
+++ b/heat_tempest_plugin/config.py
@@ -156,6 +156,11 @@
cfg.StrOpt('hidden_stack_tag',
default='data-processing-cluster',
help="Tag to be considered as hidden for stack tags tests"),
+ cfg.BoolOpt('vm_to_heat_api_insecure',
+ default=False,
+ help="Set this to True if VM images used for tests "
+ "can not verify a (self-signed) SSL certificate "
+ "of public Heat endpoint."),
]
heat_features_group = cfg.OptGroup(
diff --git a/heat_tempest_plugin/tests/api/gabbits/stacks.yaml b/heat_tempest_plugin/tests/api/gabbits/stacks.yaml
index 3090d67..1024df4 100644
--- a/heat_tempest_plugin/tests/api/gabbits/stacks.yaml
+++ b/heat_tempest_plugin/tests/api/gabbits/stacks.yaml
@@ -6,14 +6,14 @@
X-Auth-Token: $ENVIRON['OS_TOKEN']
tests:
-- name: stack list
+- name: stack list smoke
desc: 39c0245e-6055-41cf-9f0e-15adfe55ded6
GET: /stacks
status: 200
response_headers:
content-type: application/json
-- name: create empty stack
+- name: create empty stack smoke
desc: bde1b827-65fb-47ea-909f-82537e6260d3
POST: /stacks
request_headers:
@@ -32,7 +32,7 @@
location: //stacks/$ENVIRON['PREFIX']-empty/[a-f0-9-]+/
-- name: poll for empty CREATE_COMPLETE
+- name: poll for empty CREATE_COMPLETE smoke
desc: f575e5c4-2aed-4381-9f0d-2dfcb0640c4b
GET: $LOCATION
redirects: True
@@ -42,7 +42,7 @@
response_json_paths:
$.stack.stack_status: CREATE_COMPLETE
-- name: show empty stack
+- name: show empty stack smoke
desc: 89b233fe-0d55-4959-9289-0b5dabe4e4c9
GET: $LAST_URL
redirects: True
@@ -82,7 +82,7 @@
response_headers:
location: //stacks/$ENVIRON['PREFIX']-stack/[a-f0-9-]+/
-- name: poll for stack CREATE_COMPLETE
+- name: poll for stack CREATE_COMPLETE smoke
desc: 6a0fe2dc-2822-4af3-b606-321ff7ad3de9
GET: $LOCATION
redirects: True
@@ -92,13 +92,13 @@
response_json_paths:
$.stack.stack_status: CREATE_COMPLETE
-- name: show stack
+- name: show stack smoke
desc: 9b268607-0335-4667-a613-bccf81e66f8f
GET: $LAST_URL
redirects: True
status: 200
-- name: update stack
+- name: update stack smoke
desc: 6bb1ec02-dd19-4b2c-9a6d-866ce666650f
PUT: $LAST_URL
request_headers:
@@ -126,7 +126,7 @@
status: 202
-- name: poll for stack UPDATE_COMPLETE
+- name: poll for stack UPDATE_COMPLETE smoke
desc: 3e280fb3-02b6-44fb-84dd-e04921d47733
GET: $LAST_URL
redirects: True
@@ -136,7 +136,7 @@
response_json_paths:
$.stack.stack_status: UPDATE_COMPLETE
-- name: patch update stack
+- name: patch update stack smoke
desc: 927cea42-a35b-4664-b209-ab2cb34e6ef4
PATCH: $LAST_URL
request_headers:
@@ -146,7 +146,7 @@
status: 202
-- name: poll for stack patch UPDATE_COMPLETE
+- name: poll for stack patch UPDATE_COMPLETE smoke
desc: a1cfd3b4-2536-4c54-94f4-12093f2ccf3b
GET: $LAST_URL
redirects: True
@@ -155,9 +155,9 @@
delay: 1.0
response_json_paths:
$.stack.stack_status: UPDATE_COMPLETE
- $.stack.updated_time: /^(?!$HISTORY['poll for stack UPDATE_COMPLETE'].$RESPONSE['$.stack.updated_time'])/
+ $.stack.updated_time: /^(?!$HISTORY['poll for stack UPDATE_COMPLETE smoke'].$RESPONSE['$.stack.updated_time'])/
-- name: list stack outputs
+- name: list stack outputs smoke
desc: bbd98b50-b75b-44a1-b7e8-0a68fd7c6d33
GET: $LAST_URL/outputs
redirects: True
@@ -165,7 +165,7 @@
response_json_paths:
$.outputs[0].output_key: output_value
-- name: get stack output
+- name: get stack output smoke
desc: e761f5d7-70f6-4d95-a11b-e5fa0ecb43d2
GET: $LAST_URL/output_value
redirects: True
@@ -173,7 +173,7 @@
response_json_paths:
$.output.output_value: new_patched_value
-- name: delete stack
+- name: delete stack smoke
desc: bcf4c359-0a64-4652-b465-df3f688a9d4d
DELETE: /stacks/$ENVIRON['PREFIX']-stack
redirects: True
diff --git a/heat_tempest_plugin/tests/functional/test_create_update_neutron_trunk.py b/heat_tempest_plugin/tests/functional/test_create_update_neutron_trunk.py
index bdcb58e..4be8d8c 100644
--- a/heat_tempest_plugin/tests/functional/test_create_update_neutron_trunk.py
+++ b/heat_tempest_plugin/tests/functional/test_create_update_neutron_trunk.py
@@ -19,7 +19,7 @@
from heat_tempest_plugin.common import test
from heat_tempest_plugin.tests.functional import functional_base
-
+from tempest.common import utils
test_template = '''
heat_template_version: pike
@@ -99,6 +99,7 @@
return sub_ports_set
@decorators.idempotent_id('5572b0ac-fdb2-4c68-a49e-024771814471')
+ @utils.requires_ext(extension="trunk", service="network")
def test_add_first_sub_port(self):
stack_identifier = self.stack_create(template=test_template)
@@ -123,6 +124,7 @@
self._sub_ports_dict_to_set(trunk_sub_port))
@decorators.idempotent_id('c3f52330-01b7-4649-99fd-43700e6bbda3')
+ @utils.requires_ext(extension="trunk", service="network")
def test_add_a_second_sub_port(self):
parsed_template = yaml.safe_load(test_template)
sub_ports = [{'port': {'get_resource': 'sub_port_one'},
@@ -160,6 +162,7 @@
self._sub_ports_dict_to_set(trunk_sub_ports))
@decorators.idempotent_id('cb59363e-5517-42f9-8b93-9ad700e2ef4c')
+ @utils.requires_ext(extension="trunk", service="network")
def test_remove_sub_port_from_trunk(self):
sub_ports = [{'port': {'get_resource': 'sub_port_one'},
'segmentation_type': 'vlan',
@@ -197,6 +200,7 @@
self._sub_ports_dict_to_set(trunk_sub_ports))
@decorators.idempotent_id('7f0836c7-1d35-4d11-bcdc-e0e19ca68b68')
+ @utils.requires_ext(extension="trunk", service="network")
def test_remove_last_sub_port_from_trunk(self):
sub_ports = [{'port': {'get_resource': 'sub_port_one'},
'segmentation_type': 'vlan',
@@ -233,6 +237,7 @@
'not empty!' % trunk_sub_ports)
@decorators.idempotent_id('e9296d6f-009c-4530-9aaf-84a0f8281bcb')
+ @utils.requires_ext(extension="trunk", service="network")
def test_update_existing_sub_port_on_trunk(self):
sub_ports = [{'port': {'get_resource': 'sub_port_one'},
'segmentation_type': 'vlan',
@@ -263,6 +268,7 @@
self._sub_ports_dict_to_set(trunk_sub_ports))
@decorators.idempotent_id('912044d8-e0c1-4c6c-ab4e-bc1cadc46c18')
+ @utils.requires_ext(extension="trunk", service="network")
def test_update_trunk_name_and_description(self):
new_name = 'pineapple'
new_description = 'This is a test trunk'
diff --git a/heat_tempest_plugin/tests/functional/test_event_sinks.py b/heat_tempest_plugin/tests/functional/test_event_sinks.py
index 7cb1d7b..97b2667 100644
--- a/heat_tempest_plugin/tests/functional/test_event_sinks.py
+++ b/heat_tempest_plugin/tests/functional/test_event_sinks.py
@@ -29,6 +29,11 @@
value: ok
'''
+ def check_skip(self):
+ super(ZaqarEventSinkTest, self).check_skip()
+ if not self.is_service_available('messaging'):
+ self.skipTest('Service Zaqar is not available.')
+
@decorators.idempotent_id('d0b72695-e97d-4aa1-bfaf-31c14b09ac87')
def test_events(self):
queue_id = str(uuid.uuid4())
diff --git a/heat_tempest_plugin/tests/functional/test_os_wait_condition.py b/heat_tempest_plugin/tests/functional/test_os_wait_condition.py
index 603b5e5..e3e4b53 100644
--- a/heat_tempest_plugin/tests/functional/test_os_wait_condition.py
+++ b/heat_tempest_plugin/tests/functional/test_os_wait_condition.py
@@ -29,6 +29,9 @@
timeout:
type: number
default: 60
+ wc_extra_args:
+ type: string
+ default: ""
resources:
instance1:
type: OS::Nova::Server
@@ -72,7 +75,10 @@
'
params:
wc_notify:
- get_attr: [wait_handle, curl_cli]
+ list_join:
+ - " "
+ - [ get_attr: [ wait_handle, curl_cli],
+ get_param: wc_extra_args ]
wait_condition:
type: OS::Heat::WaitCondition
@@ -107,4 +113,6 @@
'image': self.conf.minimal_image_ref,
'network': self.conf.fixed_network_name,
'timeout': 120}
+ if self.conf.vm_to_heat_api_insecure:
+ params['wc_extra_args'] = '--insecure'
self.stack_create(template=self.template, parameters=params)
diff --git a/heat_tempest_plugin/tests/functional/test_software_config.py b/heat_tempest_plugin/tests/functional/test_software_config.py
index f034096..757cef9 100644
--- a/heat_tempest_plugin/tests/functional/test_software_config.py
+++ b/heat_tempest_plugin/tests/functional/test_software_config.py
@@ -229,6 +229,11 @@
queue_id = %(queue_id)s
'''
+ def check_skip(self):
+ super(ZaqarSignalTransportTest, self).check_skip()
+ if not self.is_service_available('messaging'):
+ self.skipTest('Service Zaqar is not available.')
+
@decorators.idempotent_id('3af97ced-bead-4629-b78a-97762719e990')
def test_signal_queues(self):
parms = {'flavor': self.conf.minimal_instance_type,
diff --git a/heat_tempest_plugin/tests/functional/test_waitcondition.py b/heat_tempest_plugin/tests/functional/test_waitcondition.py
index c21b33b..1965952 100644
--- a/heat_tempest_plugin/tests/functional/test_waitcondition.py
+++ b/heat_tempest_plugin/tests/functional/test_waitcondition.py
@@ -39,6 +39,11 @@
value: {'Fn::Select': ['data_id', {get_attr: [wait_condition, data]}]}
'''
+ def check_skip(self):
+ super(ZaqarWaitConditionTest, self).check_skip()
+ if not self.is_service_available('messaging'):
+ self.skipTest('Service Zaqar is not available.')
+
@decorators.idempotent_id('90183f0d-9929-43a6-8fb6-b81003824c6d')
def test_signal_queues(self):
stack_identifier = self.stack_create(
diff --git a/heat_tempest_plugin/tests/scenario/templates/app_server_lbv2_neutron.yaml b/heat_tempest_plugin/tests/scenario/templates/app_server_lbv2_neutron.yaml
index f750a98..ca4117b 100644
--- a/heat_tempest_plugin/tests/scenario/templates/app_server_lbv2_neutron.yaml
+++ b/heat_tempest_plugin/tests/scenario/templates/app_server_lbv2_neutron.yaml
@@ -29,13 +29,20 @@
subnet:
type: string
+ wc_extra_args:
+ type: string
+ default: ""
+
resources:
config:
type: OS::Test::WebAppConfig
properties:
app_port: { get_param: app_port }
- wc_curl_cli: { get_attr: [ handle, curl_cli ] }
+ wc_curl_cli:
+ list_join:
+ - " "
+ - [ get_attr: [ handle, curl_cli ], get_param: wc_extra_args ]
server:
type: OS::Nova::Server
diff --git a/heat_tempest_plugin/tests/scenario/templates/app_server_neutron.yaml b/heat_tempest_plugin/tests/scenario/templates/app_server_neutron.yaml
index 9cbf82a..c098ff9 100644
--- a/heat_tempest_plugin/tests/scenario/templates/app_server_neutron.yaml
+++ b/heat_tempest_plugin/tests/scenario/templates/app_server_neutron.yaml
@@ -26,13 +26,20 @@
timeout:
type: number
+ wc_extra_args:
+ type: string
+ default: ""
+
resources:
config:
type: OS::Test::WebAppConfig
properties:
app_port: { get_param: app_port }
- wc_curl_cli: { get_attr: [ handle, curl_cli ] }
+ wc_curl_cli:
+ list_join:
+ - " "
+ - [ get_attr: [ handle, curl_cli ], get_param: wc_extra_args ]
server:
type: OS::Nova::Server
diff --git a/heat_tempest_plugin/tests/scenario/templates/test_autoscaling_lb_neutron.yaml b/heat_tempest_plugin/tests/scenario/templates/test_autoscaling_lb_neutron.yaml
index d47e787..033581a 100644
--- a/heat_tempest_plugin/tests/scenario/templates/test_autoscaling_lb_neutron.yaml
+++ b/heat_tempest_plugin/tests/scenario/templates/test_autoscaling_lb_neutron.yaml
@@ -27,6 +27,9 @@
timeout:
type: number
default: 600
+ wc_extra_args:
+ type: string
+ default: ""
resources:
@@ -55,6 +58,7 @@
app_port: { get_param: app_port }
pool_id: { get_resource: pool }
timeout: { get_param: timeout }
+ wc_extra_args: { get_param: wc_extra_args }
scale_up:
type: OS::Heat::ScalingPolicy
diff --git a/heat_tempest_plugin/tests/scenario/templates/test_autoscaling_lbv2_neutron.yaml b/heat_tempest_plugin/tests/scenario/templates/test_autoscaling_lbv2_neutron.yaml
index 4702366..a26f7f7 100644
--- a/heat_tempest_plugin/tests/scenario/templates/test_autoscaling_lbv2_neutron.yaml
+++ b/heat_tempest_plugin/tests/scenario/templates/test_autoscaling_lbv2_neutron.yaml
@@ -27,6 +27,9 @@
timeout:
type: number
default: 600
+ wc_extra_args:
+ type: string
+ default: ""
resources:
@@ -56,6 +59,7 @@
pool: { get_resource: pool }
subnet: { get_param: subnet }
timeout: { get_param: timeout }
+ wc_extra_args: { get_param: wc_extra_args }
scale_up:
type: OS::Heat::ScalingPolicy
diff --git a/heat_tempest_plugin/tests/scenario/templates/test_server_cfn_init.yaml b/heat_tempest_plugin/tests/scenario/templates/test_server_cfn_init.yaml
index 9f94717..0095146 100644
--- a/heat_tempest_plugin/tests/scenario/templates/test_server_cfn_init.yaml
+++ b/heat_tempest_plugin/tests/scenario/templates/test_server_cfn_init.yaml
@@ -13,6 +13,9 @@
Type: String
timeout:
Type: Number
+ SignalExtraArgs:
+ Type: String
+ Default: ""
Resources:
CfnUser:
Type: AWS::IAM::User
@@ -69,10 +72,11 @@
UserData:
Fn::Replace:
- WaitHandle: {Ref: WaitHandle}
+ SignalExtraArgs: {Ref: SignalExtraArgs}
- |
#!/bin/bash -v
/opt/aws/bin/cfn-init
- /opt/aws/bin/cfn-signal -e 0 --data "`cat /tmp/smoke-status`" \
+ /opt/aws/bin/cfn-signal SignalExtraArgs -e 0 --data "`cat /tmp/smoke-status`" \
--id smoke_status "WaitHandle"
WaitHandle:
Type: AWS::CloudFormation::WaitConditionHandle
diff --git a/heat_tempest_plugin/tests/scenario/templates/test_server_signal.yaml b/heat_tempest_plugin/tests/scenario/templates/test_server_signal.yaml
index 4466a5e..4556a2f 100644
--- a/heat_tempest_plugin/tests/scenario/templates/test_server_signal.yaml
+++ b/heat_tempest_plugin/tests/scenario/templates/test_server_signal.yaml
@@ -26,6 +26,9 @@
user_data_format:
type: string
default: RAW
+ wc_extra_args:
+ type: string
+ default: ""
resources:
sg:
type: OS::Neutron::SecurityGroup
@@ -86,7 +89,10 @@
#!/bin/sh
wc_notify --data-binary '{"status": "SUCCESS", "data": "test complete"}'
params:
- wc_notify: { get_attr: ['wait_handle', 'curl_cli'] }
+ wc_notify:
+ list_join:
+ - " "
+ - [ get_attr: ['wait_handle', 'curl_cli'], get_param: wc_extra_args ]
server_floating_ip_assoc:
type: OS::Neutron::FloatingIPAssociation
diff --git a/heat_tempest_plugin/tests/scenario/templates/test_volumes_create_from_backup.yaml b/heat_tempest_plugin/tests/scenario/templates/test_volumes_create_from_backup.yaml
index ab1edf8..bc288f7 100644
--- a/heat_tempest_plugin/tests/scenario/templates/test_volumes_create_from_backup.yaml
+++ b/heat_tempest_plugin/tests/scenario/templates/test_volumes_create_from_backup.yaml
@@ -39,6 +39,11 @@
description: Description of volume
default: A volume description
+ wc_extra_args:
+ type: string
+ description: extra options to add to CURL command
+ default: ""
+
resources:
volume:
type: OS::Cinder::Volume
@@ -77,14 +82,15 @@
then
mount /dev/dev_name /mnt
TESTDATA=$(cat /mnt/testfile)
- curl -X PUT -H 'Content-Type:' --data-binary '{"Status": "SUCCESS", "Reason": "Test Complete", "Data": "Volume Data:'$TESTDATA'", "UniqueId": "instance1"}' "wc_url"
+ curl wc_extra_args -X PUT -H 'Content-Type:' --data-binary '{"Status": "SUCCESS", "Reason": "Test Complete", "Data": "Volume Data:'$TESTDATA'", "UniqueId": "instance1"}' "wc_url"
else
- curl -X PUT -H 'Content-Type:' --data-binary '{"Status": "FAILURE", "Reason": "Test Failed", "Data": "Expected device dev_name not found.", "UniqueId": "instance1"}' "wc_url"
+ curl wc_extra_args -X PUT -H 'Content-Type:' --data-binary '{"Status": "FAILURE", "Reason": "Test Failed", "Data": "Expected device dev_name not found.", "UniqueId": "instance1"}' "wc_url"
fi
params:
wc_url: { get_resource: wait_handle }
dev_name: { get_param: dev_name }
rescan_timeout: { get_param: rescan_timeout }
+ wc_extra_args: { get_param: wc_extra_args }
wait_handle:
type: OS::Heat::UpdateWaitConditionHandle
diff --git a/heat_tempest_plugin/tests/scenario/templates/test_volumes_delete_snapshot.yaml b/heat_tempest_plugin/tests/scenario/templates/test_volumes_delete_snapshot.yaml
index 3893b52..b383220 100644
--- a/heat_tempest_plugin/tests/scenario/templates/test_volumes_delete_snapshot.yaml
+++ b/heat_tempest_plugin/tests/scenario/templates/test_volumes_delete_snapshot.yaml
@@ -45,6 +45,11 @@
description: Size of volume
default: 1
+ wc_extra_args:
+ type: string
+ description: extra options to add to CURL command
+ default: ""
+
resources:
volume:
deletion_policy: 'Snapshot'
@@ -86,15 +91,16 @@
mount /dev/dev_name /mnt
echo "test_string" > /mnt/testfile
umount /mnt
- curl -X PUT -H 'Content-Type:' --data-binary '{"Status": "SUCCESS", "Reason": "Test Complete", "Data": "Completed volume configuration.", "UniqueId": "instance1"}' "wc_url"
+ curl wc_extra_args -X PUT -H 'Content-Type:' --data-binary '{"Status": "SUCCESS", "Reason": "Test Complete", "Data": "Completed volume configuration.", "UniqueId": "instance1"}' "wc_url"
else
- curl -X PUT -H 'Content-Type:' --data-binary '{"Status": "FAILURE", "Reason": "Test Failed", "Data": "Expected device dev_name not found.", "UniqueId": "instance1"}' "wc_url"
+ curl wc_extra_args -X PUT -H 'Content-Type:' --data-binary '{"Status": "FAILURE", "Reason": "Test Failed", "Data": "Expected device dev_name not found.", "UniqueId": "instance1"}' "wc_url"
fi
params:
wc_url: { get_resource: wait_handle }
dev_name: { get_param: dev_name }
rescan_timeout: { get_param: rescan_timeout }
test_string: { get_param: test_string }
+ wc_extra_args: { get_param: wc_extra_args }
wait_handle:
type: OS::Heat::UpdateWaitConditionHandle
diff --git a/heat_tempest_plugin/tests/scenario/test_autoscaling_lb.py b/heat_tempest_plugin/tests/scenario/test_autoscaling_lb.py
index 23e27c7..3323bc5 100644
--- a/heat_tempest_plugin/tests/scenario/test_autoscaling_lb.py
+++ b/heat_tempest_plugin/tests/scenario/test_autoscaling_lb.py
@@ -74,6 +74,8 @@
'lb_port': 80,
'timeout': 600
}
+ if self.conf.vm_to_heat_api_insecure:
+ parameters['wc_extra_args'] = '--insecure'
app_server_template = self._load_template(
__file__, self.app_server_template_name, self.sub_dir
diff --git a/heat_tempest_plugin/tests/scenario/test_autoscaling_lbv2.py b/heat_tempest_plugin/tests/scenario/test_autoscaling_lbv2.py
index c3bda78..eee1fbc 100644
--- a/heat_tempest_plugin/tests/scenario/test_autoscaling_lbv2.py
+++ b/heat_tempest_plugin/tests/scenario/test_autoscaling_lbv2.py
@@ -73,6 +73,8 @@
'subnet': self.conf.fixed_subnet_name,
'public_net': self.conf.floating_network_name
}
+ if self.conf.vm_to_heat_api_insecure:
+ parameters['wc_extra_args'] = '--insecure'
app_server_template = self._load_template(
__file__, self.app_server_template_name, self.sub_dir
diff --git a/heat_tempest_plugin/tests/scenario/test_server_cfn_init.py b/heat_tempest_plugin/tests/scenario/test_server_cfn_init.py
index 963d1ad..817e8c6 100644
--- a/heat_tempest_plugin/tests/scenario/test_server_cfn_init.py
+++ b/heat_tempest_plugin/tests/scenario/test_server_cfn_init.py
@@ -113,6 +113,8 @@
'timeout': self.conf.build_timeout,
'subnet': self.net['subnets'][0],
}
+ if self.conf.vm_to_heat_api_insecure:
+ parameters['SignalExtraArgs'] = '--insecure'
# Launch stack
stack_id = self.launch_stack(
diff --git a/heat_tempest_plugin/tests/scenario/test_server_signal.py b/heat_tempest_plugin/tests/scenario/test_server_signal.py
index 1823087..167dfa0 100644
--- a/heat_tempest_plugin/tests/scenario/test_server_signal.py
+++ b/heat_tempest_plugin/tests/scenario/test_server_signal.py
@@ -33,7 +33,8 @@
'timeout': self.conf.build_timeout,
'user_data_format': user_data_format
}
-
+ if self.conf.vm_to_heat_api_insecure:
+ parameters['wc_extra_args'] = '--insecure'
# Launch stack
sid = self.launch_stack(
template_name="test_server_signal.yaml",
diff --git a/heat_tempest_plugin/tests/scenario/test_volumes.py b/heat_tempest_plugin/tests/scenario/test_volumes.py
index 57d0936..5a39aac 100644
--- a/heat_tempest_plugin/tests/scenario/test_volumes.py
+++ b/heat_tempest_plugin/tests/scenario/test_volumes.py
@@ -119,7 +119,8 @@
'timeout': self.conf.build_timeout,
'network': self.net['id']
}
-
+ if self.conf.vm_to_heat_api_insecure:
+ parameters['wc_extra_args'] = '--insecure'
# Launch stack
stack_id = self.launch_stack(
template_name='test_volumes_delete_snapshot.yaml',