aboutsummaryrefslogtreecommitdiffstats
path: root/functest/tests/unit/core
AgeCommit message (Collapse)AuthorFilesLines
2017-04-04Add unit tests for featureCédric Ollivier1-0/+108
They partially cover feature but already highlight bugs. Several tests are skipped to allow merging. Their decorators could be removed as soon as feature is fixed. I think bad-continuation is false positive so it's disabled (pep8 and flake8 return ok). JIRA: FUNCTEST-779 Change-Id: I89b9e2ec0388eea2471d941b2c653deca7fbddf6 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-04-04Add case_name as constructor argCédric Ollivier2-7/+11
It allows managing multiple TestCase names with only one TestCase module. It is mainly required by odl which implements: - odl, - odl_netvirt, - fds. It also renames case to case_name in Features to conform with TestCases. JIRA: FUNCTEST-762 Change-Id: Ie254f754a0ea3077a8afda1c470528d38c79478f Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-03-28Fully fix pylint warnings in test_testcaseCédric Ollivier1-0/+7
It partially takes into account missing-docstring. It is disabled for public methods as they are unit tests. It has been rated at 10.00/10. Change-Id: I70e6729b9228d58cc67a18da29b925dad22cf5bd Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-03-28Rename test_testcase_base to test_testcaseCédric Ollivier1-0/+0
It follows "Rename testcase_base to testcase" [1] [1] https://gerrit.opnfv.org/gerrit/#/c/31879/ Change-Id: I54bb62a37bdab842f433790688128a459b0ac78c Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-03-27Rename testcase_base to testcaseCédric Ollivier1-10/+10
It simply removes the useless suffix. Change-Id: Ib9a682b57d8f33518359d817a593bb3786577390 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-03-27Switch TestcaseBase to TestCaseCédric Ollivier1-10/+10
It partially reverts "Rename TestCasesBase into TestcaseBase" [1] and removes the useless suffix too. [1] https://gerrit.opnfv.org/gerrit/#/c/25391/ Change-Id: Iddf2ec8d6c1dafe6e4c6713c2e69969613317471 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-03-26Fix pylint warnings in test_testcase_baseCédric Ollivier1-5/+6
It takes into account the following warnings: - wrong-import-order - no-value-for-parameter The 'no-value-for-parameter' warnings are false positive. The added default values are useless but avoid them. Change-Id: I50d0af178d9da668a3c72e75f5af467d36ca0e6a Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-03-20[vnf_base] improve exceptionboucherv1-13/+9
Return on part of previous changes in commit: 30257 https://gerrit.opnfv.org/gerrit/#/c/30257/ Change-Id: I11b33ee2a6f9d4cbcf1449006b47be508fce655e Signed-off-by: boucherv <valentin.boucher@orange.com>
2017-03-10Remove raise exceptionsMorgan Richomme1-8/+13
until exceptions are better managed in abstraction Currently it triggers an exit from the jenkins job and prevent other tests to be run Change-Id: Id3b18c1d6d3b786fc78456b3ad51963d2cbb2cc1 Signed-off-by: Morgan Richomme <morgan.richomme@orange.com>
2017-02-14Merge changes from topic 'revert_write_to_file'Jose Lausuch1-5/+3
* changes: Add can_dump_request_to_file decorator Revert "write test results to a local file"
2017-02-14Fix again unix permissionsCédric Ollivier1-0/+0
It has been induced by [1]. [1] https://gerrit.opnfv.org/gerrit/#/c/26695/ Change-Id: I4bec6bdc30c5901c19bdc4ca43b89f60bd50a6aa Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-02-13Revert "write test results to a local file"Cédric Ollivier1-5/+3
This reverts commit ee21af78fbfc93e888acda121f08d2b216dd0159. Change-Id: If7c8d3b645073574862eb67225b1e11b0dd7a021 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-01-19Leverage logging config and refactor the loggerhelenyao1-2/+0
JIRA: FUNCTEST-690 The detailed benefits are listed in the JIRA description. 1. Refactored the functest_logger to make use of configuration file 2. Avoided configuring the logging every time a logger is initialized 3. Applied separate logging configuration fo unit test by removing saving log to file Change-Id: I6e27eaba727ae6d704f0301f15359dc3ea7b2f97 Signed-off-by: helenyao <yaohelan@huawei.com>
2017-01-19Merge "write test results to a local file"Morgan Richomme1-3/+6
2017-01-18Merge "Add VnfOnBoarding Abstraction"Jose Lausuch1-0/+52
2017-01-18Add VnfOnBoarding AbstractionMorgan Richomme1-0/+52
JIRA: FUNCTEST-535 Change-Id: Idfa3dfd64554472aaac3f26a504e1f74d2f42926 Signed-off-by: Morgan Richomme <morgan.richomme@orange.com>
2017-01-17write test results to a local filewu.zhihui1-3/+6
Write test result to a file or push it to DB depends on the value format of test_db_url which is defined in config_functest.yaml. Meanwhile, test_db_url can be set by os envrion value "RESULT_STORE". If test_db_url is a url, e.g. http:// or https://, then push result to DB. If test_db_url is a file location, e.g. file:///, then write results to a file with json data. One result record, one line. JIRA: FUNCTEST-657 Change-Id: I579087cd2c24d61a79142b5d67003fb486b6c723 Signed-off-by: wu.zhihui <wu.zhihui1@zte.com.cn>
2017-01-04Patch logging.FileHandlerCédric Ollivier1-0/+1
It avoids creating a dummy functest.log for unit testing. Change-Id: Ib163d5d58284822b1904444fb60b08e92ee0ab9b Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2016-12-16Avoid side effects induced by functest_constants in ODL UTCédric Ollivier1-1/+1
It partially reverts [1] (odl.py + test_odl.py). [1] https://gerrit.opnfv.org/gerrit/#/c/24619/ Change-Id: Ie51ccf10f8ffa0a63086796f8bb722ef50567b2d Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2016-12-15Add check_criteria() in testcase_baseCédric Ollivier1-1/+16
It allows checking testcase results and then returning an error value to CI. Now run() should return EX_OK even if criteria is FAILED. It also fixes an issue induced by [1]. [1] https://gerrit.opnfv.org/gerrit/#/c/24561/ Change-Id: Iaa095696f9dcb87f8cc95179b4f404b092d1e23e Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2016-12-02Rename TestCasesBase into TestcaseBasehelenyao1-8/+8
JIRA: FUNCTEST-628 1. rename the TestCasesBase into TestcaseBase 2. updated the module name to testcase_base.py Change-Id: Ic6b5d8209098c136613a2419c3790668fdbd493e Signed-off-by: helenyao <yaohelan@huawei.com>
2016-11-24Extracted all global parameters into functest_constants.pyhelenyao1-1/+1
JIRA: FUNCTEST-533 1. Extracted all global variables into functest_constants.py and updated all affected areas accordingly 2. Used os.path.join to replace '/' to come up with the path for better cross-platform support and improve the path accuracy 3. Removed unused variables 4. Updated the hardcoded path in Dockerfile by using variable reference 5. Removed "/" ending from all path variables 6. Updated the unit test Change-Id: Ib30a81d1f0c83fbaef042d63c187c27bd18301bb Signed-off-by: helenyao <yaohelan@huawei.com>
2016-11-09Repo structure modificationMorgan Richomme2-0/+87
- create functest subdirectory - rename unit tests - adapt path in exec and config files JIRA: FUNCTEST-525 Change-Id: Ifd5c6edfb5bda1b09f82848e2269ad5fbeb84d0a Signed-off-by: Morgan Richomme <morgan.richomme@orange.com>