From a5c7a5358ab160f7518798dc977bf85fed32ddb9 Mon Sep 17 00:00:00 2001 From: xudan Date: Tue, 17 Oct 2017 05:27:10 -0400 Subject: Use functest clean module to do the sdnvpn resources cleanup 1. If there throw an exception during the test of one sdnvpn test case, it will not do the clean. 2. Then there are many resources left, such as network, subnet, server... 3. This is a bug of sdnvpn see JIRA: SDNVPN-184 4. The patch for fixing this bug https://gerrit.opnfv.org/gerrit/#/c/44777/ 5. Currently, use functest module "functest openstack clean" to clean the SUT. JIRA: DOVETAIL-524 Change-Id: I629fc6fdc9e4c95960f6122358ff219a467d441b Signed-off-by: xudan --- dovetail/testcase/sdnvpn.tc001.yml | 3 +++ dovetail/testcase/sdnvpn.tc002.yml | 3 +++ dovetail/testcase/sdnvpn.tc003.yml | 3 +++ dovetail/testcase/sdnvpn.tc004.yml | 3 +++ dovetail/testcase/sdnvpn.tc008.yml | 3 +++ 5 files changed, 15 insertions(+) diff --git a/dovetail/testcase/sdnvpn.tc001.yml b/dovetail/testcase/sdnvpn.tc001.yml index 786892be..b5d6ad0c 100644 --- a/dovetail/testcase/sdnvpn.tc001.yml +++ b/dovetail/testcase/sdnvpn.tc001.yml @@ -8,8 +8,11 @@ dovetail.sdnvpn.tc001: pre_condition: - "sed -i 's/testcase_1/sdnvpn.test.functest.testcase_1/' /usr/local/lib/python2.7/dist-packages/sdnvpn/test/functest/testcase_1.py" - "sed -i 's/run_sdnvpn_tests.py/run_sdnvpn_tests.py -r/' /usr/local/lib/python2.7/dist-packages/functest/ci/testcases.yaml" + - "source /home/opnfv/functest/conf/openstack.creds && functest openstack snapshot-create" pre_copy: exist_src_file: sdnvpn_config_testcase1.yaml dest_path: /usr/local/lib/python2.7/dist-packages/sdnvpn/test/functest/config.yaml + post_condition: + - "source /home/opnfv/functest/conf/openstack.creds && functest openstack clean" report: sub_testcase_list: diff --git a/dovetail/testcase/sdnvpn.tc002.yml b/dovetail/testcase/sdnvpn.tc002.yml index 900fb461..ce2fa44f 100644 --- a/dovetail/testcase/sdnvpn.tc002.yml +++ b/dovetail/testcase/sdnvpn.tc002.yml @@ -8,8 +8,11 @@ dovetail.sdnvpn.tc002: pre_condition: - "sed -i 's/testcase_2/sdnvpn.test.functest.testcase_2/' /usr/local/lib/python2.7/dist-packages/sdnvpn/test/functest/testcase_2.py" - "sed -i 's/run_sdnvpn_tests.py/run_sdnvpn_tests.py -r/' /usr/local/lib/python2.7/dist-packages/functest/ci/testcases.yaml" + - "source /home/opnfv/functest/conf/openstack.creds && functest openstack snapshot-create" pre_copy: exist_src_file: sdnvpn_config_testcase2.yaml dest_path: /usr/local/lib/python2.7/dist-packages/sdnvpn/test/functest/config.yaml + post_condition: + - "source /home/opnfv/functest/conf/openstack.creds && functest openstack clean" report: sub_testcase_list: diff --git a/dovetail/testcase/sdnvpn.tc003.yml b/dovetail/testcase/sdnvpn.tc003.yml index 8d28b57c..ad8c1dc1 100644 --- a/dovetail/testcase/sdnvpn.tc003.yml +++ b/dovetail/testcase/sdnvpn.tc003.yml @@ -8,8 +8,11 @@ dovetail.sdnvpn.tc003: pre_condition: - "sed -i 's/testcase_3/sdnvpn.test.functest.testcase_3/' /usr/local/lib/python2.7/dist-packages/sdnvpn/test/functest/testcase_3.py" - "sed -i 's/run_sdnvpn_tests.py/run_sdnvpn_tests.py -r/' /usr/local/lib/python2.7/dist-packages/functest/ci/testcases.yaml" + - "source /home/opnfv/functest/conf/openstack.creds && functest openstack snapshot-create" pre_copy: exist_src_file: sdnvpn_config_testcase3.yaml dest_path: /usr/local/lib/python2.7/dist-packages/sdnvpn/test/functest/config.yaml + post_condition: + - "source /home/opnfv/functest/conf/openstack.creds && functest openstack clean" report: sub_testcase_list: diff --git a/dovetail/testcase/sdnvpn.tc004.yml b/dovetail/testcase/sdnvpn.tc004.yml index 236c39bd..e00adfac 100644 --- a/dovetail/testcase/sdnvpn.tc004.yml +++ b/dovetail/testcase/sdnvpn.tc004.yml @@ -8,8 +8,11 @@ dovetail.sdnvpn.tc004: pre_condition: - "sed -i 's/testcase_4/sdnvpn.test.functest.testcase_4/' /usr/local/lib/python2.7/dist-packages/sdnvpn/test/functest/testcase_4.py" - "sed -i 's/run_sdnvpn_tests.py/run_sdnvpn_tests.py -r/' /usr/local/lib/python2.7/dist-packages/functest/ci/testcases.yaml" + - "source /home/opnfv/functest/conf/openstack.creds && functest openstack snapshot-create" pre_copy: exist_src_file: sdnvpn_config_testcase4.yaml dest_path: /usr/local/lib/python2.7/dist-packages/sdnvpn/test/functest/config.yaml + post_condition: + - "source /home/opnfv/functest/conf/openstack.creds && functest openstack clean" report: sub_testcase_list: diff --git a/dovetail/testcase/sdnvpn.tc008.yml b/dovetail/testcase/sdnvpn.tc008.yml index a4d82316..e643ec20 100644 --- a/dovetail/testcase/sdnvpn.tc008.yml +++ b/dovetail/testcase/sdnvpn.tc008.yml @@ -8,8 +8,11 @@ dovetail.sdnvpn.tc008: pre_condition: - "sed -i 's/testcase_8/sdnvpn.test.functest.testcase_8/' /usr/local/lib/python2.7/dist-packages/sdnvpn/test/functest/testcase_8.py" - "sed -i 's/run_sdnvpn_tests.py/run_sdnvpn_tests.py -r/' /usr/local/lib/python2.7/dist-packages/functest/ci/testcases.yaml" + - "source /home/opnfv/functest/conf/openstack.creds && functest openstack snapshot-create" pre_copy: exist_src_file: sdnvpn_config_testcase8.yaml dest_path: /usr/local/lib/python2.7/dist-packages/sdnvpn/test/functest/config.yaml + post_condition: + - "source /home/opnfv/functest/conf/openstack.creds && functest openstack clean" report: sub_testcase_list: -- cgit 1.2.3-korg