aboutsummaryrefslogtreecommitdiffstats
path: root/functest/tests/unit/ci
AgeCommit message (Collapse)AuthorFilesLines
2017-05-19Merge "Define Runner class"Jose Lausuch1-73/+98
2017-05-19Merge "Modify how to disable logging in unit test."Jose Lausuch4-8/+4
2017-05-18Modify how to disable logging in unit test.Cédric Ollivier4-8/+4
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-18Add a new directory to hold pre-downloaded imageshelenyao1-0/+8
Put all images in the new direcotry. If users want to use the local image, map the local directory to the ${HOME}/functest/images Change-Id: I0d309b93f52b3da23d6130056f1a19907313ef68 Signed-off-by: helenyao <yaohelan@huawei.com>
2017-05-16Define Runner classCédric Ollivier1-73/+98
It simply converts run_tests.py's functions to Runner's methods. This proposal could be enhanced in a second step to fully leverage on object programming. It defines as instance variables the former static variables to allow multiple runs (it's mandatory for unit testing). All false positives in unit tests are fixed but run_tests.py is still not fully covered. Change-Id: I8f91c132aa8b2248041f31e46238dd5598344d34 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-05-16Add enabled flag in testcases.yamljose.lausuch2-0/+6
This will allow enable/disable test cases directly using true/false. Change-Id: Iaa7d051ebb8dd9e5a6f835a823f58f1e17a87b8d Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
2017-05-16Switch from generate_report to PrettyTableCédric Ollivier2-155/+5
run_tests.py now relies on PrettyTable as most of the openstack clients. generate_report.py and its related unit tests are simply removed. It sets padding_width=5 in testcase.py too to conform with run_tests.py. Now report is printed in every case. Change-Id: Id9ce93f984503f25d6a2150482f397853fa3dd64 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-05-16Fix how to get tier_nameCédric Ollivier1-0/+7
The tier name was incorrect when passing a test case as run_test.py arg. Change-Id: I6f439fc7b90facb3f0553798bd1fe06ac9f09475 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-05-09Remove the former results in DB urlCédric Ollivier1-4/+4
It conforms generate_report.py with the previous change [1]. [1] https://gerrit.opnfv.org/gerrit/#/c/33511/ Change-Id: I677ebd416f462a591439fc7b637c02d7964e6173 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-05-05Replace CONST.* by getattribute/setattrjose.lausuch3-54/+62
Directories affected: - ci - core and respective unit tests Change-Id: I6a3d5aa68de29fc5a37ae543a067ff797eba33e6 Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
2017-04-11Modify TestCase constructor attributesCédric Ollivier1-1/+1
Every feature/testcase now allows receiving the data defined in testcases.yaml as args (name is renamed to case_name). From the time being, only project and case names are handled. Next pending patches will add criteria, cmd and repo to this list. It keeps the default values for case names except for features which will be aggregated into Feature. Change-Id: Id742d100b8183d7f10894c24ae6879d1b2b60ac9 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-03-27More Unit Tests for ci directoryashishk19943-5/+199
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-16Merge "Added Unit Tests for ci/generate_report with argument refactoring for ↵Morgan Richomme1-0/+129
main and init functions in generate_reports"
2017-03-16Merge "Added Unit Tests for ci/run_tests"Morgan Richomme1-0/+192
2017-03-16Merge "Added Unit Tests for ci/tier_handler"Morgan Richomme1-0/+128
2017-03-15Added Unit Tests for ci/tier_builderashishk19941-0/+83
Change-Id: I66f43fb09472948bc71178cd8aeb14dc1ab5fa55 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>
2017-03-15Added Unit Tests for ci/run_testsashishk19941-0/+192
Change-Id: I5cd900cee809b8fd935a5c8b862a9ecd6278bdf5 Signed-off-by: ashishk1994 <ashishk.iiit@gmail.com>
2017-03-15Added Unit Tests for ci/generate_report withashishk19941-0/+129
argument refactoring for main and init functions in generate_reports Change-Id: I291d04a9c0ed381f4b92e989270c0b9a37c15264 Signed-off-by: ashishk1994 <ashishk.iiit@gmail.com>
2017-03-08Bugfix: modify test_prepare_env to make verify job successfulLinda Wang1-3/+5
Functest verify job failed due to that test_prepare_env.py mistook one function of ft_utils.execute_command_raise. Change-Id: Ib3b8ca807308bf5c6d250e7debb4c9e1e106e3d1 Signed-off-by: Linda Wang <wangwulin@huawei.com>
2017-03-01Added Unit Tests for ci/prepare_envashishk19942-0/+345
JIRA: FUNCTEST-663 Change-Id: Ie240b5f24d11e3a6079cafd260d9d48ed36d3d0a Signed-off-by: ashishk1994 <ashishk.iiit@gmail.com>