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/opnfv_tests/openstack/refstack_client/refstack_client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'functest/opnfv_tests/openstack/refstack_client') diff --git a/functest/opnfv_tests/openstack/refstack_client/refstack_client.py b/functest/opnfv_tests/openstack/refstack_client/refstack_client.py index 5f1f3a1dd..b2a215337 100755 --- a/functest/opnfv_tests/openstack/refstack_client/refstack_client.py +++ b/functest/opnfv_tests/openstack/refstack_client/refstack_client.py @@ -27,7 +27,7 @@ from tempest_conf import TempestConf logger = logging.getLogger(__name__) -class RefstackClient(testcase.TestCase): +class RefstackClient(testcase.OSGCTestCase): def __init__(self, **kwargs): if "case_name" not in kwargs: -- cgit 1.2.3-korg