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 --- docs/com/pres/framework/framework.md | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'docs/com/pres/framework') diff --git a/docs/com/pres/framework/framework.md b/docs/com/pres/framework/framework.md index 1b07a8e0b..40d5a6a70 100644 --- a/docs/com/pres/framework/framework.md +++ b/docs/com/pres/framework/framework.md @@ -59,12 +59,14 @@ base model for single test case ### methods -| Method | Purpose | -|-------------------|--------------------------------------------| -| run(**kwargs) | run the test case | -| is_successful() | interpret the results of the test case | -| get_duration() | return the duration of the test case | -| push_to_db() | push the results of the test case to the DB| +| Method | Purpose | +|-------------------|-------------------------------| +| run(**kwargs) | run the test case | +| is_successful() | interpret the results | +| get_duration() | return the duration | +| push_to_db() | push the results to the DB | +| create_snapshot() | save the testing environement | +| clean() | clean the resources | ### run(**kwargs) @@ -136,7 +138,6 @@ case_name: first project_name: functest criteria: 100 blocking: true -clean_flag: false description: '' dependencies: installer: '' @@ -204,7 +205,6 @@ case_name: second project_name: functest criteria: 100 blocking: true -clean_flag: false description: '' dependencies: installer: '' @@ -238,7 +238,6 @@ case_name: third project_name: functest criteria: 100 blocking: true -clean_flag: false description: '' dependencies: installer: '' @@ -294,7 +293,6 @@ case_name: fourth project_name: functest criteria: 100 blocking: true -clean_flag: false description: '' dependencies: installer: '' -- cgit 1.2.3-korg