Define create_snapshot() and clean() in TestCase 37/35237/10
authorCédric Ollivier <cedric.ollivier@orange.com>
Tue, 23 May 2017 18:58:42 +0000 (20:58 +0200)
committerCédric Ollivier <cedric.ollivier@orange.com>
Tue, 30 May 2017 07:45:59 +0000 (09:45 +0200)
commit49a7e57f112d855b0609721b6082b15a94417380
tree06ae633c210b9f5857edbdeac94792e7699af720
parentbec2511a842a37429b8343dc5f83b11d96dd47b8
Define create_snapshot() and clean() in TestCase

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 <cedric.ollivier@orange.com>
17 files changed:
docs/com/pres/framework/framework.md
docs/testing/user/userguide/runfunctest.rst
functest/ci/run_tests.py
functest/ci/testcases.yaml
functest/ci/tier_builder.py
functest/ci/tier_handler.py
functest/core/testcase.py
functest/opnfv_tests/openstack/rally/rally.py
functest/opnfv_tests/openstack/refstack_client/refstack_client.py
functest/opnfv_tests/openstack/tempest/tempest.py
functest/opnfv_tests/openstack/vping/vping_base.py
functest/tests/unit/ci/test_run_tests.py
functest/tests/unit/ci/test_tier_builder.py
functest/tests/unit/ci/test_tier_handler.py
functest/tests/unit/core/test_testcase.py
functest/utils/openstack_clean.py
functest/utils/openstack_snapshot.py