aboutsummaryrefslogtreecommitdiffstats
path: root/functest/tests/unit/ci/test_tier_handler.py
AgeCommit message (Collapse)AuthorFilesLines
2018-01-21Fully test and cover functest/ci/tier_*Cédric Ollivier1-61/+58
It also fixes check_deployment.py and ci unit tests which were wrong when testing exceptions. Now ci modules are rated 10/10 and fully covered. Change-Id: I30dca491b44cc54aa1abc0d0433c00b4dcabfdc4 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-12-14Improve the pylint score of functest-coreLinda Wang1-3/+5
It also modifies the file list to ensure the rating of ci modules. Change-Id: Ia1e414be5364cb3da3d54882db428024ed6bd99f Signed-off-by: Linda Wang <wangwulin@huawei.com>
2017-05-30Define create_snapshot() and clean() in TestCaseCédric Ollivier1-1/+0
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>
2017-05-18Modify how to disable logging in unit test.Cédric Ollivier1-2/+1
Logs are only disabled when the unit tests are run from cmdline. It allows running them via pytest_suite_runner.py and printing their results to functest.log. You should notice that the unit test must disable the logger of the tested TestCase (e.g. testcase.TestCase.logger.disabled = 1). Otherwise false logs will be printed in console. Change-Id: Ic171e4575c8bab2e52db1897ae026b61a03b6247 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-05-16Add enabled flag in testcases.yamljose.lausuch1-0/+5
This will allow enable/disable test cases directly using true/false. Change-Id: Iaa7d051ebb8dd9e5a6f835a823f58f1e17a87b8d Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
2017-03-27More Unit Tests for ci directoryashishk19941-0/+9
This patch adds more unit tests for ci/prepare_env, ci/run_tests and ci/tier_handler to reach the coverage more than 80% Change-Id: Ia3b7105542105bf8c5e3db58c898ba0569190a80 Signed-off-by: ashishk1994 <ashishk.iiit@gmail.com>
2017-03-15Added Unit Tests for ci/tier_handlerashishk19941-0/+128
Change-Id: I0b1d7efcf44c0ad2c1e8d3163fe72a61883eb86a Signed-off-by: ashishk1994 <ashishk.iiit@gmail.com>