From 49a7e57f112d855b0609721b6082b15a94417380 Mon Sep 17 00:00:00 2001 From: Cédric Ollivier Date: Tue, 23 May 2017 20:58:42 +0200 Subject: Define create_snapshot() and clean() in TestCase MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit They replace the former calls in run_tests which are not suitable for all test cases. Now any test case can define how to clean its resources. If the snapshot cannot be created, the test case is considered as failed. Only a message is printed if any failure during cleaning. It also defines a new class called OSGCTestCase useful for test cases which don't clean their OpenStack resources. All test cases located in opnfv_tests/openstack inherit from it to keep the global behavior unchanged. It also deletes exit instructions in openstack_clean and openstack_snapshot, removes clean flags in testcases.yaml and updates the related utils. All Docs are modified as well. JIRA: FUNCTEST-438 Change-Id: I8938e6255708012380389763a24059ace4ce45d8 Signed-off-by: Cédric Ollivier --- functest/ci/tier_handler.py | 5 ----- 1 file changed, 5 deletions(-) (limited to 'functest/ci/tier_handler.py') diff --git a/functest/ci/tier_handler.py b/functest/ci/tier_handler.py index 36ce245e7..4f2f14ecd 100644 --- a/functest/ci/tier_handler.py +++ b/functest/ci/tier_handler.py @@ -109,14 +109,12 @@ class TestCase(object): dependency, criteria, blocking, - clean_flag, description=""): self.name = name self.enabled = enabled self.dependency = dependency self.criteria = criteria self.blocking = blocking - self.clean_flag = clean_flag self.description = description @staticmethod @@ -149,9 +147,6 @@ class TestCase(object): def is_blocking(self): return self.blocking - def needs_clean(self): - return self.clean_flag - def __str__(self): lines = split_text(self.description, LINE_LENGTH - 6) -- cgit 1.2.3-korg