Browse Source

Remove possible existing packages in deployment test

In scenario test, test packages will be uploaded and then deleted after test
executed. But in case of the packages deletion failure, it will block the
following tests.

This patch checks and removes those test packages before uploading them.

Change-Id: I90c5d903d8c5c3eeface2735bba61d01a877aaf8
Rocky 1 month ago
parent
commit
42f113e69e

+ 9
- 0
murano_tempest_tests/tests/scenario/application_catalog/test_deployment.py View File

@@ -50,6 +50,15 @@ class TestMuranoDeployment(base.BaseApplicationCatalogScenarioTest):
50 50
         else:
51 51
             cls.client = cls.application_catalog_client
52 52
 
53
+        # remove existing test packages
54
+        existing_packages = cls.client.get_list_packages()
55
+        for package in existing_packages:
56
+            if package["fully_qualified_name"] in \
57
+                    ['io.murano.test.apache.ApacheHttpServerCustom',
58
+                     'io.murano.apps.test.Lighttpd',
59
+                     'io.murano.apps.test.UpdateExecutor']:
60
+                cls.client.delete_package(package["id"])
61
+
53 62
         cls.packages[0] = cls.client.upload_package(
54 63
             application_name, archive_name, dir_with_archive,
55 64
             {"categories": ["Web"], "tags": ["test"]})

Loading…
Cancel
Save