Shorter test case names are accepted for tempest blacklist file 49/17949/3
authorvitikkan <viktor.tikkanen@nokia.com>
Wed, 3 Aug 2016 06:19:21 +0000 (09:19 +0300)
committervitikkan <viktor.tikkanen@nokia.com>
Wed, 3 Aug 2016 11:33:23 +0000 (14:33 +0300)
Blacklist file handling is changed so that also partial test case
names are accepted. For example, "tempest.api.object_storage"
entry will exclude all the test cases containing this string.

JIRA: FUNCTEST-401

Change-Id: I620be7dfd5d980a343d2f7cc7c0dbe40598bf65c
Signed-off-by: vitikkan <viktor.tikkanen@nokia.com>
testcases/OpenStack/tempest/custom_tests/blacklist.txt
testcases/OpenStack/tempest/run_tempest.py

index 65bee33..5dd8fe2 100644 (file)
@@ -6,15 +6,15 @@
         - fuel
         - apex
     tests:
-        - tempest.api.compute.servers.test_create_server.ServersTestJSON.test_list_servers[id-9a438d88-10c6-4bcd-8b5b-5b6e25e1346f,smoke]
-        - tempest.api.compute.servers.test_create_server.ServersTestJSON.test_verify_server_details[id-5de47127-9977-400a-936f-abcfbec1218f,smoke]
-        - tempest.api.compute.servers.test_create_server.ServersTestManualDisk.test_list_servers[id-9a438d88-10c6-4bcd-8b5b-5b6e25e1346f,smoke]
-        - tempest.api.compute.servers.test_create_server.ServersTestManualDisk.test_verify_server_details[id-5de47127-9977-400a-936f-abcfbec1218f,smoke]
-        - tempest.api.compute.servers.test_server_actions.ServerActionsTestJSON.test_reboot_server_hard[id-2cb1baf6-ac8d-4429-bf0d-ba8a0ba53e32,smoke]
-        - tempest.scenario.test_network_basic_ops.TestNetworkBasicOps.test_network_basic_ops[compute,id-f323b3ba-82f8-4db7-8ea6-6a895869ec49,network,smoke]
-        - tempest.scenario.test_server_basic_ops.TestServerBasicOps.test_server_basic_ops[compute,id-7fff3fb3-91d8-4fd0-bd7d-0204f1f180ba,network,smoke]
-        - tempest.scenario.test_volume_boot_pattern.TestVolumeBootPattern.test_volume_boot_pattern[compute,id-557cd2c2-4eb8-4dce-98be-f86765ff311b,image,smoke,volume]
-        - tempest.scenario.test_volume_boot_pattern.TestVolumeBootPatternV2.test_volume_boot_pattern[compute,id-557cd2c2-4eb8-4dce-98be-f86765ff311b,image,smoke,volume]
+        - tempest.api.compute.servers.test_create_server.ServersTestJSON.test_list_servers
+        - tempest.api.compute.servers.test_create_server.ServersTestJSON.test_verify_server_details
+        - tempest.api.compute.servers.test_create_server.ServersTestManualDisk.test_list_servers
+        - tempest.api.compute.servers.test_create_server.ServersTestManualDisk.test_verify_server_details
+        - tempest.api.compute.servers.test_server_actions.ServerActionsTestJSON.test_reboot_server_hard
+        - tempest.scenario.test_network_basic_ops.TestNetworkBasicOps.test_network_basic_ops
+        - tempest.scenario.test_server_basic_ops.TestServerBasicOps.test_server_basic_ops
+        - tempest.scenario.test_volume_boot_pattern.TestVolumeBootPattern.test_volume_boot_pattern
+        - tempest.scenario.test_volume_boot_pattern.TestVolumeBootPatternV2.test_volume_boot_pattern
 
     scenarios:
         - os-odl_l2-nofeature-ha
     installers:
         - joid
     tests:
-        - tempest.api.object_storage.test_account_quotas.AccountQuotasTest.test_admin_modify_quota
-        - tempest.api.object_storage.test_account_quotas.AccountQuotasTest.test_upload_valid_object
-        - tempest.api.object_storage.test_container_quotas.ContainerQuotasTest.test_upload_large_object
-        - tempest.api.object_storage.test_container_quotas.ContainerQuotasTest.test_upload_too_many_objects
-        - tempest.api.object_storage.test_container_quotas.ContainerQuotasTest.test_upload_valid_object
-        - tempest.api.object_storage.test_container_services.ContainerTest.test_create_container
-        - tempest.api.object_storage.test_container_services.ContainerTest.test_list_container_contents
-        - tempest.api.object_storage.test_container_services.ContainerTest.test_list_container_metadata
+        - tempest.api.object_storage
index 1dd908d..53a70b7 100755 (executable)
@@ -308,9 +308,12 @@ def apply_tempest_blacklist():
         black_tests = []
         logger.debug("Tempest blacklist file does not exist.")
 
-    for line in cases_file:
-        if line not in black_tests:
-            result_file.write(str(line) + '\n')
+    for cases_line in cases_file:
+        for black_tests_line in black_tests:
+            if black_tests_line in cases_line:
+                break
+        else:
+            result_file.write(str(cases_line) + '\n')
     result_file.close()