Browse Source

Added tempest action

This patch adds tempest action which uses rally for launch tempest tests

Change-Id: I6d5c51b779fe5addfb7af926e5ba05dd3b554571
Sergey Reshetnyak 2 years ago
parent
commit
9f62e56ec6

+ 19
- 0
docker/rally-tempest/Dockerfile.j2 View File

@@ -0,0 +1,19 @@
1
+FROM {{ image_spec("openstack-base") }}
2
+MAINTAINER {{ maintainer }}
3
+
4
+{{ copy_sources("openstack/rally", "/rally") }}
5
+{{ copy_sources("openstack/tempest", "/tempest") }}
6
+
7
+RUN useradd --user-group --create-home --home-dir /var/lib/rally rally \
8
+    && chmod 755 /var/lib/rally \
9
+    && /var/lib/microservices/venv/bin/pip install -r /tempest/requirements.txt --upgrade /rally \
10
+    && rm -fr /rally \
11
+    && mv /tempest /var/lib/rally/tempest
12
+
13
+COPY newton-skip-list.list /var/lib/rally/
14
+COPY check_status.py /var/lib/rally/
15
+
16
+RUN chown -R rally: /var/lib/rally \
17
+    && chmod 755 /var/lib/rally/check_status.py
18
+
19
+USER rally

+ 20
- 0
docker/rally-tempest/check_status.py View File

@@ -0,0 +1,20 @@
1
+#!/usr/bin/env python
2
+
3
+from __future__ import print_function
4
+
5
+import json
6
+import sys
7
+
8
+
9
+def main():
10
+    data = json.loads(sys.stdin.read())
11
+    if data["failures"] == 0:
12
+        print("Tests succeeded")
13
+        sys.exit(0)
14
+    else:
15
+        print("Tests failed: %d" % data["failures"])
16
+        sys.exit(1)
17
+
18
+
19
+if __name__ == "__main__":
20
+    main()

+ 105
- 0
docker/rally-tempest/newton-skip-list.list View File

@@ -0,0 +1,105 @@
1
+tempest.api.object_storage.test_account_bulk.BulkTest.test_bulk_delete[id-c075e682-0d2a-43b2-808d-4116200d736d]
2
+tempest.api.object_storage.test_account_bulk.BulkTest.test_bulk_delete_by_POST[id-dbea2bcb-efbb-4674-ac8a-a5a0e33d1d79]
3
+tempest.api.object_storage.test_account_bulk.BulkTest.test_extract_archive[id-a407de51-1983-47cc-9f14-47c2b059413c]
4
+tempest.api.object_storage.test_account_quotas.AccountQuotasTest.test_admin_modify_quota[id-63f51f9f-5f1d-4fc6-b5be-d454d70949d6,smoke]
5
+tempest.api.object_storage.test_account_quotas.AccountQuotasTest.test_upload_valid_object[id-a22ef352-a342-4587-8f47-3bbdb5b039c4,smoke]
6
+tempest.api.object_storage.test_account_quotas_negative.AccountQuotasNegativeTest.test_upload_large_object[id-cf9e21f5-3aa4-41b1-9462-28ac550d8d3f,negative]
7
+tempest.api.object_storage.test_account_quotas_negative.AccountQuotasNegativeTest.test_user_modify_quota[id-d1dc5076-555e-4e6d-9697-28f1fe976324,negative]
8
+tempest.api.object_storage.test_account_services.AccountTest.test_list_account_metadata[id-4894c312-6056-4587-8d6f-86ffbf861f80,smoke]
9
+tempest.api.object_storage.test_account_services.AccountTest.test_list_containers[id-3499406a-ae53-4f8c-b43a-133d4dc6fe3f,smoke]
10
+tempest.api.object_storage.test_account_services.AccountTest.test_list_containers_with_end_marker[id-5ca164e4-7bde-43fa-bafb-913b53b9e786]
11
+tempest.api.object_storage.test_account_services.AccountTest.test_list_containers_with_format_json[id-1c7efa35-e8a2-4b0b-b5ff-862c7fd83704]
12
+tempest.api.object_storage.test_account_services.AccountTest.test_list_containers_with_format_xml[id-4477b609-1ca6-4d4b-b25d-ad3f01086089]
13
+tempest.api.object_storage.test_account_services.AccountTest.test_list_containers_with_limit[id-5cfa4ab2-4373-48dd-a41f-a532b12b08b2]
14
+tempest.api.object_storage.test_account_services.AccountTest.test_list_containers_with_limit_and_end_marker[id-888a3f0e-7214-4806-8e50-5e0c9a69bb5e]
15
+tempest.api.object_storage.test_account_services.AccountTest.test_list_containers_with_limit_and_marker[id-f7064ae8-dbcc-48da-b594-82feef6ea5af]
16
+tempest.api.object_storage.test_account_services.AccountTest.test_list_containers_with_limit_and_marker_and_end_marker[id-8cf98d9c-e3a0-4e44-971b-c87656fdddbd]
17
+tempest.api.object_storage.test_account_services.AccountTest.test_list_containers_with_marker[id-638f876d-6a43-482a-bbb3-0840bca101c6]
18
+tempest.api.object_storage.test_account_services.AccountTest.test_list_containers_with_marker_and_end_marker[id-ac8502c2-d4e4-4f68-85a6-40befea2ef5e]
19
+tempest.api.object_storage.test_account_services.AccountTest.test_list_containers_with_prefix[id-365e6fc7-1cfe-463b-a37c-8bd08d47b6aa]
20
+tempest.api.object_storage.test_account_services.AccountTest.test_list_extensions[id-6eb04a6a-4860-4e31-ba91-ea3347d76b58]
21
+tempest.api.object_storage.test_account_services.AccountTest.test_list_no_account_metadata[id-b904c2e3-24c2-4dba-ad7d-04e90a761be5]
22
+tempest.api.object_storage.test_account_services.AccountTest.test_list_no_containers[id-884ec421-fbad-4fcc-916b-0580f2699565]
23
+tempest.api.object_storage.test_account_services.AccountTest.test_update_account_metadata_with_create_and_delete_metadata[id-8e5fc073-59b9-42ee-984a-29ed11b2c749]
24
+tempest.api.object_storage.test_account_services.AccountTest.test_update_account_metadata_with_create_matadata_key[id-64fd53f3-adbd-4639-af54-436e4982dbfb]
25
+tempest.api.object_storage.test_account_services.AccountTest.test_update_account_metadata_with_create_metadata[id-e2a08b5f-3115-4768-a3ee-d4287acd6c08]
26
+tempest.api.object_storage.test_account_services.AccountTest.test_update_account_metadata_with_delete_matadata[id-9f60348d-c46f-4465-ae06-d51dbd470953]
27
+tempest.api.object_storage.test_account_services.AccountTest.test_update_account_metadata_with_delete_matadata_key[id-d4d884d3-4696-4b85-bc98-4f57c4dd2bf1]
28
+tempest.api.object_storage.test_account_services_negative.AccountNegativeTest.test_list_containers_with_non_authorized_user[id-070e6aca-6152-4867-868d-1118d68fb38c,negative]
29
+tempest.api.object_storage.test_container_acl.ObjectTestACLs.test_read_object_with_rights[id-a3270f3f-7640-4944-8448-c7ea783ea5b6]
30
+tempest.api.object_storage.test_container_acl.ObjectTestACLs.test_write_object_with_rights[id-aa58bfa5-40d9-4bc3-82b4-d07f4a9e392a]
31
+tempest.api.object_storage.test_container_acl_negative.ObjectACLsNegativeTest.test_delete_object_with_non_authorized_user[id-7343ac3d-cfed-4198-9bb0-00149741a492,negative]
32
+tempest.api.object_storage.test_container_acl_negative.ObjectACLsNegativeTest.test_delete_object_without_write_rights[id-b4e366f8-f185-47ab-b789-df4416f9ecdb,negative]
33
+tempest.api.object_storage.test_container_acl_negative.ObjectACLsNegativeTest.test_read_object_with_non_authorized_user[id-abf63359-be52-4feb-87dd-447689fc77fd,negative]
34
+tempest.api.object_storage.test_container_acl_negative.ObjectACLsNegativeTest.test_read_object_without_rights[id-9ed01334-01e9-41ea-87ea-e6f465582823,negative]
35
+tempest.api.object_storage.test_container_acl_negative.ObjectACLsNegativeTest.test_write_object_with_non_authorized_user[id-63d84e37-55a6-42e2-9e5f-276e60e26a00,negative]
36
+tempest.api.object_storage.test_container_acl_negative.ObjectACLsNegativeTest.test_write_object_without_rights[id-a3a585a7-d8cf-4b65-a1a0-edc2b1204f85,negative]
37
+tempest.api.object_storage.test_container_acl_negative.ObjectACLsNegativeTest.test_write_object_without_write_rights[id-8ba512ad-aa6e-444e-b882-2906a0ea2052,negative]
38
+tempest.api.object_storage.test_container_quotas.ContainerQuotasTest.test_upload_large_object[id-22eeeb2b-3668-4160-baef-44790f65a5a0,smoke]
39
+tempest.api.object_storage.test_container_quotas.ContainerQuotasTest.test_upload_too_many_objects[id-3a387039-697a-44fc-a9c0-935de31f426b,smoke]
40
+tempest.api.object_storage.test_container_quotas.ContainerQuotasTest.test_upload_valid_object[id-9a0fb034-86af-4df0-86fa-f8bd7db21ae0,smoke]
41
+tempest.api.object_storage.test_container_services.ContainerTest.test_create_container_with_metadata_value[id-e1e8df32-7b22-44e1-aa08-ccfd8d446b58]
42
+tempest.api.object_storage.test_container_services.ContainerTest.test_list_container_metadata[id-96e68f0e-19ec-4aa2-86f3-adc6a45e14dd,smoke]
43
+tempest.api.object_storage.test_container_services.ContainerTest.test_list_no_container_metadata[id-a2faf936-6b13-4f8d-92a2-c2278355821e]
44
+tempest.api.object_storage.test_container_services_negative.ContainerNegativeTest.test_create_container_metadata_exceeds_overall_metadata_count[id-ac666539-d566-4f02-8ceb-58e968dfb732,negative]
45
+tempest.api.object_storage.test_container_services_negative.ContainerNegativeTest.test_create_container_metadata_name_exceeds_max_length[id-41e645bf-2e68-4f84-bf7b-c71aa5cd76ce,negative]
46
+tempest.api.object_storage.test_container_services_negative.ContainerNegativeTest.test_create_container_metadata_value_exceeds_max_length[id-81e36922-326b-4b7c-8155-3bbceecd7a82,negative]
47
+tempest.api.object_storage.test_container_services_negative.ContainerNegativeTest.test_create_container_name_exceeds_max_length[id-30686921-4bed-4764-a038-40d741ed4e78,negative]
48
+tempest.api.object_storage.test_container_services_negative.ContainerNegativeTest.test_delete_non_empty_container[id-42da116e-1e8c-4c96-9e06-2f13884ed2b1,negative]
49
+tempest.api.object_storage.test_container_services_negative.ContainerNegativeTest.test_delete_with_nonexistent_container_name[id-65387dbf-a0e2-4aac-9ddc-16eb3f1f69ba,negative]
50
+tempest.api.object_storage.test_container_services_negative.ContainerNegativeTest.test_get_metadata_headers_with_invalid_container_name[id-1a95ab2e-b712-4a98-8a4d-8ce21b7557d6,negative]
51
+tempest.api.object_storage.test_container_services_negative.ContainerNegativeTest.test_list_all_container_objects_on_deleted_container[id-86b2ab08-92d5-493d-acd2-85f0c848819e,negative]
52
+tempest.api.object_storage.test_container_services_negative.ContainerNegativeTest.test_list_all_container_objects_with_nonexistent_container[id-14331d21-1e81-420a-beea-19cb5e5207f5,negative]
53
+tempest.api.object_storage.test_container_services_negative.ContainerNegativeTest.test_update_metadata_with_nonexistent_container_name[id-125a24fa-90a7-4cfc-b604-44e49d788390,negative]
54
+tempest.api.object_storage.test_container_staticweb.StaticWebTest.test_web_index[id-c1f055ab-621d-4a6a-831f-846fcb578b8b]
55
+tempest.api.object_storage.test_container_staticweb.StaticWebTest.test_web_listing_css[id-bc37ec94-43c8-4990-842e-0e5e02fc8926]
56
+tempest.api.object_storage.test_container_sync_middleware.ContainerSyncMiddlewareTest.test_container_synchronization[id-ea4645a1-d147-4976-82f7-e5a7a3065f80,slow]
57
+tempest.api.object_storage.test_crossdomain.CrossdomainTest.test_get_crossdomain_policy[id-d1b8b031-b622-4010-82f9-ff78a9e915c7]
58
+tempest.api.object_storage.test_healthcheck.HealthcheckTest.test_get_healthcheck[id-db5723b1-f25c-49a9-bfeb-7b5640caf337]
59
+tempest.api.object_storage.test_object_expiry.ObjectExpiryTest.test_get_object_after_expiry_time[id-fb024a42-37f3-4ba5-9684-4f40a7910b41]
60
+tempest.api.object_storage.test_object_expiry.ObjectExpiryTest.test_get_object_at_expiry_time[id-e592f18d-679c-48fe-9e36-4be5f47102c5]
61
+tempest.api.object_storage.test_object_formpost.ObjectFormPostTest.test_post_object_using_form[id-80fac02b-6e54-4f7b-be0d-a965b5cbef76]
62
+tempest.api.object_storage.test_object_formpost_negative.ObjectFormPostNegativeTest.test_post_object_using_form_expired[id-d3fb3c4d-e627-48ce-9379-a1631f21336d,negative]
63
+tempest.api.object_storage.test_object_formpost_negative.ObjectFormPostNegativeTest.test_post_object_using_form_invalid_signature[id-b277257f-113c-4499-b8d1-5fead79f7360]
64
+tempest.api.object_storage.test_object_services.ObjectTest.test_copy_object_2d_way[id-06f90388-2d0e-40aa-934c-e9a8833e958a]
65
+tempest.api.object_storage.test_object_services.ObjectTest.test_copy_object_across_containers[id-aa467252-44f3-472a-b5ae-5b57c3c9c147]
66
+tempest.api.object_storage.test_object_services.ObjectTest.test_copy_object_in_same_container[id-1a9ab572-1b66-4981-8c21-416e2a5e6011]
67
+tempest.api.object_storage.test_object_services.ObjectTest.test_copy_object_to_itself[id-2248abba-415d-410b-9c30-22dff9cd6e67]
68
+tempest.api.object_storage.test_object_services.ObjectTest.test_copy_object_with_x_fresh_metadata[id-5a9e2cc6-85b6-46fc-916d-0cbb7a88e5fd]
69
+tempest.api.object_storage.test_object_services.ObjectTest.test_copy_object_with_x_object_meta[id-edabedca-24c3-4322-9b70-d6d9f942a074]
70
+tempest.api.object_storage.test_object_services.ObjectTest.test_copy_object_with_x_object_metakey[id-a28a8b99-e701-4d7e-9d84-3b66f121460b]
71
+tempest.api.object_storage.test_object_services.ObjectTest.test_create_object[id-5b4ce26f-3545-46c9-a2ba-5754358a4c62,smoke]
72
+tempest.api.object_storage.test_object_services.ObjectTest.test_create_object_with_content_disposition[id-5daebb1d-f0d5-4dc9-b541-69672eff00b0]
73
+tempest.api.object_storage.test_object_services.ObjectTest.test_create_object_with_content_encoding[id-605f8317-f945-4bee-ae91-013f1da8f0a0]
74
+tempest.api.object_storage.test_object_services.ObjectTest.test_create_object_with_etag[id-73820093-0503-40b1-a478-edf0e69c7d1f]
75
+tempest.api.object_storage.test_object_services.ObjectTest.test_create_object_with_transfer_encoding[id-4f84422a-e2f2-4403-b601-726a4220b54e]
76
+tempest.api.object_storage.test_object_services.ObjectTest.test_create_object_with_x_fresh_metadata[id-0f3d62a6-47e3-4554-b0e5-1a5dc372d501]
77
+tempest.api.object_storage.test_object_services.ObjectTest.test_create_object_with_x_object_meta[id-1c7ed3e4-2099-406b-b843-5301d4811baf]
78
+tempest.api.object_storage.test_object_services.ObjectTest.test_create_object_with_x_object_metakey[id-e4183917-33db-4153-85cc-4dacbb938865]
79
+tempest.api.object_storage.test_object_services.ObjectTest.test_create_object_with_x_remove_object_meta[id-ce798afc-b278-45de-a5ce-2ea124b98b99]
80
+tempest.api.object_storage.test_object_services.ObjectTest.test_create_object_with_x_remove_object_metakey[id-ad21e342-7916-4f9e-ab62-a1f885f2aaf9]
81
+tempest.api.object_storage.test_object_services.ObjectTest.test_delete_object[id-17738d45-03bd-4d45-9e0b-7b2f58f98687]
82
+tempest.api.object_storage.test_object_services.ObjectTest.test_get_object_if_different[id-50d01f12-526f-4360-9ac2-75dd508d7b68]
83
+tempest.api.object_storage.test_object_services.ObjectTest.test_get_object_with_x_object_manifest[id-11b4515b-7ba7-4ca8-8838-357ded86fc10]
84
+tempest.api.object_storage.test_object_services.ObjectTest.test_list_object_metadata_with_x_object_manifest[id-23a3674c-d6de-46c3-86af-ff92bfc8a3da]
85
+tempest.api.object_storage.test_object_services.ObjectTest.test_object_upload_in_segments[id-e3e6a64a-9f50-4955-b987-6ce6767c97fb]
86
+tempest.api.object_storage.test_object_services.ObjectTest.test_update_object_metadata_with_x_object_manifest[id-08854588-6449-4bb7-8cca-f2e1040f5e6f]
87
+tempest.api.object_storage.test_object_services.PublicObjectTest.test_access_public_container_object_without_using_creds[id-07c9cf95-c0d4-4b49-b9c8-0ef2c9b27193]
88
+tempest.api.object_storage.test_object_services.PublicObjectTest.test_access_public_object_with_another_user_creds[id-54e2a2fe-42dc-491b-8270-8e4217dd4cdc]
89
+tempest.api.object_storage.test_object_slo.ObjectSloTest.test_delete_large_object[id-87b6dfa1-abe9-404d-8bf0-6c3751e6aa77]
90
+tempest.api.object_storage.test_object_slo.ObjectSloTest.test_list_large_object_metadata[id-e69ad766-e1aa-44a2-bdd2-bf62c09c1456]
91
+tempest.api.object_storage.test_object_slo.ObjectSloTest.test_retrieve_large_object[id-49bc49bc-dd1b-4c0f-904e-d9f10b830ee8]
92
+tempest.api.object_storage.test_object_slo.ObjectSloTest.test_upload_manifest[id-2c3f24a6-36e8-4711-9aa2-800ee1fc7b5b]
93
+tempest.api.object_storage.test_object_temp_url.ObjectTempUrlTest.test_get_object_using_temp_url[id-f91c96d4-1230-4bba-8eb9-84476d18d991]
94
+tempest.api.object_storage.test_object_temp_url.ObjectTempUrlTest.test_get_object_using_temp_url_key_2[id-671f9583-86bd-4128-a034-be282a68c5d8]
95
+tempest.api.object_storage.test_object_temp_url.ObjectTempUrlTest.test_get_object_using_temp_url_with_inline_query_parameter[id-9d9cfd90-708b-465d-802c-e4a8090b823d]
96
+tempest.api.object_storage.test_object_temp_url.ObjectTempUrlTest.test_head_object_using_temp_url[id-249a0111-5ad3-4534-86a7-1993d55f9185]
97
+tempest.api.object_storage.test_object_temp_url.ObjectTempUrlTest.test_put_object_using_temp_url[id-9b08dade-3571-4152-8a4f-a4f2a873a735]
98
+tempest.api.object_storage.test_object_temp_url_negative.ObjectTempUrlNegativeTest.test_get_object_after_expiration_time[id-5a583aca-c804-41ba-9d9a-e7be132bdf0b,negative]
99
+tempest.api.object_storage.test_object_version.ContainerTest.test_versioned_container[id-a151e158-dcbf-4a1f-a1e7-46cd65895a6f]
100
+tempest.api.object_storage.test_object_version.ContainerTest.test_versioned_container[id-a151e158-dcbf-4a1f-a1e7-46cd65895a6f]
101
+tempest.api.orchestration.stacks.test_swift_resources.SwiftResourcesTestJSON.test_acl[id-73d0c093-9922-44a0-8b1d-1fc092dee367,object_storage]
102
+tempest.api.orchestration.stacks.test_swift_resources.SwiftResourcesTestJSON.test_created_containers[id-bd438b18-5494-4d5a-9ce6-d2a942ec5060,object_storage]
103
+tempest.api.orchestration.stacks.test_swift_resources.SwiftResourcesTestJSON.test_created_resources[id-1a6fe69e-4be4-4990-9a7a-84b6f18019cb]
104
+tempest.api.orchestration.stacks.test_swift_resources.SwiftResourcesTestJSON.test_metadata[id-fda06135-6777-4594-aefa-0f6107169698,object_storage]
105
+tempest.scenario.test_object_storage_telemetry_middleware.TestObjectStorageTelemetry.test_swift_middleware_notifies[id-6d6b88e5-3e38-41bc-b34a-79f713a6cb84,object_storage,telemetry]

+ 12
- 0
service/actions/tempest.yaml View File

@@ -0,0 +1,12 @@
1
+actions:
2
+  - name: tempest
3
+    image: rally-tempest
4
+    dependencies:
5
+      - keystone
6
+    command: /var/lib/rally/run-tempest.sh
7
+    files:
8
+      - path: /var/lib/rally/tempest.conf
9
+        content: tempest.conf.j2
10
+      - path: /var/lib/rally/run-tempest.sh
11
+        content: run-tempest.sh.j2
12
+        perm: "0700"

+ 11
- 0
service/files/defaults.yaml View File

@@ -0,0 +1,11 @@
1
+configs:
2
+  rally:
3
+    log_server_port:
4
+      cont: 8080
5
+sources:
6
+  openstack/rally:
7
+    git_url: https://git.openstack.org/openstack/rally.git
8
+    git_ref: 0.7.0
9
+  openstack/tempest:
10
+    git_url: https://git.openstack.org/openstack/tempest.git
11
+    git_ref: 13.0.0

+ 35
- 0
service/files/run-tempest.sh.j2 View File

@@ -0,0 +1,35 @@
1
+#!/bin/bash
2
+
3
+set -ex
4
+
5
+# OS credentials
6
+export OS_AUTH_URL={{ address("keystone", keystone.admin_port, with_scheme=True) }}
7
+export OS_IDENTITY_API_VERSION=3
8
+export OS_PASSWORD={{ openstack.user_password }}
9
+export OS_PROJECT_DOMAIN_NAME=default
10
+export OS_PROJECT_NAME={{ openstack.project_name }}
11
+export OS_USERNAME={{ openstack.user_name }}
12
+export OS_USER_DOMAIN_NAME=default
13
+
14
+function prepare_tempest_conf {
15
+    local public_network_id="$(openstack network show {{ neutron.bootstrap.external.net_name }} -f value -c id)"
16
+    cat <<EOF >> /var/lib/rally/tempest.conf
17
+
18
+[network]
19
+floating_network_name = {{ neutron.bootstrap.external.net_name }}
20
+public_network_id = $public_network_id
21
+EOF
22
+}
23
+
24
+rally-manage db create
25
+rally deployment create --fromenv --name=tempest
26
+rally verify install --system-wide --source /var/lib/rally/tempest
27
+
28
+prepare_tempest_conf
29
+
30
+rally verify genconfig --override --add-options /var/lib/rally/tempest.conf
31
+rally verify showconfig
32
+
33
+rally verify start --system-wide --skip-list /var/lib/rally/newton-skip-list.list
34
+
35
+rally verify results | /var/lib/rally/check_status.py

+ 21
- 0
service/files/tempest.conf.j2 View File

@@ -0,0 +1,21 @@
1
+[network-feature-enabled]
2
+ipv6_subnet_attributes = false
3
+ipv6 = false
4
+
5
+[compute]
6
+min_microversion = 2.1
7
+max_microversion = 2.38
8
+min_compute_nodes = 2
9
+
10
+[volume]
11
+build_timeout = 300
12
+storage_protocol = ceph
13
+
14
+[object-storage-feature-enabled]
15
+discoverability = false
16
+
17
+[compute-feature-enabled]
18
+nova_cert = false
19
+personality = true
20
+block_migration_for_live_migration = false
21
+live_migration = true

Loading…
Cancel
Save