summaryrefslogtreecommitdiffstats
path: root/dovetail/tests/unit
AgeCommit message (Collapse)AuthorFilesLines
2019-11-20Update the result check for rally testsxudan1-6/+11
JIRA: DOVETAIL-790 Change-Id: Ia3bacf307cd2543820eae86733f76a472e34ead2 Signed-off-by: xudan <xudan16@huawei.com>
2019-11-19Fix exception when running HA tests without pod.yamlxudan3-8/+54
1. use volumes '-v' to map files/directories which may be non-existing 2. use mounts '--mount' to map files/directories which couldn't be non-existing JIRA: DOVETAIL-789 Change-Id: I2184e5baed3d1491a2df4d3a1a77a11e3e9b4fc8 Signed-off-by: xudan <xudan16@huawei.com>
2019-10-25Update API to python3 and add some addtional APIsxudan1-1/+1
Update the unit test case to fix the py27 failure. Change-Id: Ic75b8fc037c320ec5599eb007dcee43788e32807 Signed-off-by: xudan <xudan16@huawei.com>
2019-10-12Bugfix: got an error on ci when rally tests failedxudan1-0/+22
see https://build.opnfv.org/ci/view/dovetail/job/dovetail-fuel-baremetal-proposed_tests-optional-hunter/10/console Change-Id: I7c9b0426603c22a2ef5f4b15ca26fbc0768bd19f Signed-off-by: xudan <xudan16@huawei.com>
2019-10-11Update all redirected links in Dovetail docsxudan1-8/+5
The pod ld-build2 only has python 3.6 installed, so change the tox env to be 3.6 Other pods has python 3.5 to verify pep8, py35 ... Change-Id: I0289d7ce96ffa49dd08ce4b855fe071a5e608cbf Signed-off-by: xudan <xudan16@huawei.com>
2019-09-18Fault fixing for cmd_exec util methodPanagiotis Karalis1-4/+3
When the 'dovetail run' command is assigned, the error "TypeError: must be str, not bytes" is appeared. Due to a different handling of strings in the Python3, this error is appeared during of command execution (i.e. exec_cmd method). Each piece of the string should be decoded, before it will be appended to the rest one. Signed-off-by: Panagiotis Karalis <panos.pkaralis@gmail.com> Change-Id: I65629f3f76cc3e44f3926a744d00791ef588d2aa
2019-09-16Move the proj to python3Panagiotis Karalis7-68/+69
The aim of this patch is to upgrade python version of this project from python2 to python3. Signed-off-by: Panagiotis Karalis <panos.pkaralis@gmail.com> Change-Id: I3d3ef01176fda1b23a0542a24625be2f3368c40e
2019-09-10Use assertEqual instead of assertEqualsxudan8-210/+209
DeprecationWarning: Please use assertEqual instead Change-Id: I84db84e85a8a43486109bb948258e57c8b86fdfb Signed-off-by: xudan <xudan16@huawei.com>
2019-09-02Add portal_key_file into all test case yml filesxudan3-0/+17
Change-Id: If111a8cc56c31ec3e22b090aca92ff56d41f7e01 Signed-off-by: xudan <xudan16@huawei.com>
2019-08-27Add validation disabled/enabled to results.jsonxudan3-7/+24
Change-Id: I918f85c5ac89cf2745efa8513946a2b5ab8638b1 Signed-off-by: xudan <xudan16@huawei.com>
2019-08-23Add run tests APIxudan1-8/+19
Change-Id: I456d5d1459faa20d9dd8afd0c235a4bb6cbfbcce Signed-off-by: xudan <xudan16@huawei.com>
2019-06-10Bugfix: Fix Dovetail 2 bugs found with CI resultsxudan2-15/+2
There are 2 bugs found with CI results of functest.tempest.neutron_tempest_plugin_api and all HA test cases. Yardtsick conf file does't mapping the keyfile to Yardstick container, so all HA test cases got SSHERROR. Also remove some useless debug msg to make dovetail.log more concise. Change-Id: I63c12d1b91ed5f8f8a893689384685ca9215f367 Signed-off-by: xudan <xudan16@huawei.com>
2019-05-16Fix the verdict of sub test casesxudan1-2/+9
Error to group skipped sub test cases to passed one. Example: Skipped sub test case will be parsed as passed in following case. skipped sub test case: tempest.api.network.test_routers.RoutersTest.test_create_show_list_update_delete_router passed sub test case list includes this one: tempest.api.network.test_routers.RoutersTest.test_add_remove_router_interface_with_subnet_id Then the skipped one will be checked as pass. JIRA: DOVETAIL-775 Change-Id: I449f4968c23a9def1177a7c9645e5dcb89b2ec30 Signed-off-by: xudan <xudan16@huawei.com>
2019-05-09Add Licensexudan2-0/+18
Many files in Dovetail repo are lacking of License after LF scanning. Add all of them except the following files: 1. docker/Dockerfile.aarch64.patch 2. 0001-Allow-additional-properties-in-API-responses.patch 3. docs/images/dovetail_offline_mode.xcf 4. docs/images/dovetail_onfline_mode.xcf 5. all png files 6. all empty files Change-Id: If1a0b7c2d35d6682c87c4eb9106e1998dc4ca3bc Signed-off-by: xudan <xudan16@huawei.com>
2019-04-17Failed to upload results to ONAP portalPanagiotis Karalis3-1/+125
The results.json file generated by running 'dovetail run --testsuite xxx' is different from the one generated by running 'dovetail run --testcase xxx'. The former can be uploaded to ONAP portal successfully but the latter one can't. The main reason is that the latter one lacking of 'vnf_type'. Keep the results.json with the same format for both running one test suite or several test cases. JIRA: DOVETAIL-769 Change-Id: I46af84f9f229f9e601439f68c9ed9df9477d002b Signed-off-by: Panagiotis Karalis <pkaralis@intracom-telecom.com>
2019-04-03Push CI results to OPNFV test DBxudan3-10/+83
In order to use OPNFV test results page to do the ayalysis of all OVP test cases, it needs to push all results generated by Dovetail CI jobs to test DB and then using http://testresults.opnfv.org/test/#/results to check all results. The following data must contain in the POST body: 1. project_name 2. case_name 3. details 4. installer 5. scenario 6. pod_name 7. build_tag 8. criteria 9. start_date 10. stop_date 11. version JIRA: DOVETAIL-767 Change-Id: I925ae249e24efd7bfb1c68a69150e9c22f0cdf36 Signed-off-by: xudan <xudan16@huawei.com>
2019-03-28Fix VVP test caseStamatis Katsaounis1-5/+5
This patch adds check for no environment variables provided to container configuration. Furthermore, it changes the check results file to a list of check result files. Change-Id: I2112ee1fd4b3156608d8a27dd3b9c90dbe35a24c Signed-off-by: Stamatis Katsaounis <mokats@intracom-telecom.com> Co-Authored-By: Panagiotis Karalis <pkaralis@intracom-telecom.com>
2019-03-20Improve DockerfileStamatis Katsaounis1-3/+3
This patch improves the Dockerfile which produces the Dovetail image. Change-Id: I65e65f155afe237b11c668e6486e48b55cc7e96c Signed-off-by: Stamatis Katsaounis <mokats@intracom-telecom.com>
2019-03-18Replace subprocess commands with Docker SDKStamatis Katsaounis2-136/+114
JIRA: DOVETAIL-752 This patch replaces all python subprocess commands with the Docker SDK relevant commands. Change-Id: Iac7caffd80a863a8a022247d735b2a7f2792e49d Signed-off-by: Stamatis Katsaounis <mokats@intracom-telecom.com>
2019-03-13Calculate checksum for input VNFStamatis Katsaounis2-4/+49
This patch adds checksum information inside ONAP related test case run results. The checksum is produced by the VNF input which can either be a CSAR file or an archive of Heat templates. Change-Id: I0ed58bdc9cc4031da08fd2ac220ef294520ef447 Signed-off-by: Stamatis Katsaounis <mokats@intracom-telecom.com>
2019-03-08Add Functest Rally test casesStamatis Katsaounis1-0/+55
This patch adds all Rally testcases of Functest to Dovetail. Change-Id: I8b20bce9966e924fd5aac41bde5a30442394db05 Signed-off-by: Stamatis Katsaounis <mokats@intracom-telecom.com>
2019-03-07Fix the verdict of TC in sub-testcase list resultPanagiotis Karalis1-0/+7
When the sub-test case list is defined, in the dovetail results, each test case is appeared with the its verdict next to its name. Once a sub-testcase is passed, the verdict PASS is appeared next to the name of sub testcase. Once a sub-testcase is skipped or failed, the verdict FAIL is appeared next to the name of sub-testcase. This fix updates the code so that the verdict of skipped and failed sub test cases to be appeared respectively next to its sub-tsetcase name. JIRA: DOVETAIL-763 Change-Id: Ib05b3793a57acbaa67b89321a840ae11251c2417 Signed-off-by: Panagiotis Karalis <pkaralis@intracom-telecom.com>
2019-03-07Provide a list of check results files instead of oneStamatis Katsaounis1-33/+33
This patchs gives the ability to provide more than one check results file. Furthermore, it does not alter the behavior of the existing tests but prepares dovetail to be able to fetch information from many sources. Change-Id: I23cd23d2908ad6bdddd94b977813d0e81dc0c05a Signed-off-by: Stamatis Katsaounis <mokats@intracom-telecom.com>
2019-02-20Remove deprecated ONAP lifecycle test caseStamatis Katsaounis5-247/+7
This patch removes the ONAP lifecycle deprecated test case. Furthermore, it clears helper functions as well as unwanted configuration. Change-Id: Ib958457cf120ffb641a72be028d3a031741c44c6 Signed-off-by: Stamatis Katsaounis <mokats@intracom-telecom.com>
2019-02-14Dynamic results version and vnf type recognitionStamatis Katsaounis1-2/+6
This patch makes it able to fetch the version from the testsuite. Furthermore, in case of ONAP test cases it adds the vnf_type to the produced results.json file in order to be parsed from the results portal. Finally, it creates a testuite for ONAP TOSCA related tests. Change-Id: I613358c445cfe62730b98fee5e8c6fba7d322e90 Signed-off-by: Stamatis Katsaounis <mokats@intracom-telecom.com>
2019-02-01Add ONAP VVP Heat Template validation testsStamatis Katsaounis4-14/+232
Change-Id: I9a3d56932ce41191901381831013768d1c57a749 Signed-off-by: Stamatis Katsaounis <mokats@intracom-telecom.com>
2019-01-03Add ONAP VNF SDK verification testsxudan3-4/+239
Please refer to env_config.sh.onap.sample when testing it. The guide of preparing local env for onap package validation can be found here https://gerrit.onap.org/r/#/c/75119 Change-Id: I39d6b11544847756126623a7eb3b953dc800c470 Signed-off-by: xudan <xudan16@huawei.com>
2018-12-20Simplify project conf filesxudan3-135/+17
1. use copy commands instead of pre_copy 2. remove redundant items in project conf files 3. make the volume mapping clearer Change-Id: I6c6aa58fac65d7e40105e0a54f6544ee5c47db31 Signed-off-by: xudan <xudan16@huawei.com>
2018-12-17make item 'extra_container' available for every projectxudan1-0/+7
The item 'extra_container' used to be available for Bottlenecks only. Make it open for Dovetail framework. Change-Id: If4f2c032924447b97e401d497aca0309c0f5d847 Signed-off-by: xudan <xudan16@huawei.com>
2018-12-11Enable ShellRunnerxudan2-58/+10
1. fix the bug 'ShellRunner' object has no attribute 'archive_logs' 2. remove the testarea_supported because it's not very necessary for the test cases themselves and can make it a little more simple to add a test case with new test area JIRA: DOVETAIL-750 Change-Id: I71ee74615200376adca2a0db040753e5fce329bc Signed-off-by: xudan <xudan16@huawei.com>
2018-11-23Integrate k8s test cassesxudan6-341/+272
In order to integrate k8s test cases, Dovetail framework should do some refactor and make it more general for k8s test cases as well as ONAP ones. Integrate 2 k8s test cases. JIRA: DOVETAIL-748 Change-Id: Ibd87754ffb5fb29f6b4ce79232af860c2ed2da9c Signed-off-by: xudan <xudan16@huawei.com>
2018-11-20Add missing unit tests for report fileStamatis Katsaounis1-0/+1156
JIRA: DOVETAIL-724 This patch adds unit tests for report file methods of Dovetail which were missing. Change-Id: I2ba7c8f9fcfb962988b2904b01538e9f89a0d849 Signed-off-by: Stamatis Katsaounis <mokats@intracom-telecom.com>
2018-11-20Add missing unit tests for run fileStamatis Katsaounis2-0/+691
JIRA: DOVETAIL-724 This patch adds unit tests for run file methods of Dovetail which were missing. Change-Id: I1700c8c97430899abdc2b752a3dcbd4d09a334ac Signed-off-by: Stamatis Katsaounis <mokats@intracom-telecom.com>
2018-11-15Add missing unit tests for testcase fileStamatis Katsaounis1-0/+660
JIRA: DOVETAIL-724 This patch adds unit tests for Tescases classes methods of Dovetail which were missing. Change-Id: Ie1b665249ce8afaa76b59b0dbe7f132e404a5569 Signed-off-by: Stamatis Katsaounis <mokats@intracom-telecom.com>
2018-11-14Add missing unit tests for test_runner fileStamatis Katsaounis1-0/+652
JIRA: DOVETAIL-724 This patch adds unit tests for Runners classes methods of Dovetail which were missing. Change-Id: Ib985a44db86be02a7b9cefb8deca187bb50e78cc Signed-off-by: Stamatis Katsaounis <mokats@intracom-telecom.com>
2018-11-14Add missing unit tests for container fileStamatis Katsaounis1-0/+765
JIRA: DOVETAIL-724 This patch adds unit tests for container class methods of Dovetail which were missing. Change-Id: Iaba3bbfbb8838278e20ac9f63ef6e01f9ada1cbc Signed-off-by: Stamatis Katsaounis <mokats@intracom-telecom.com>
2018-11-14Add missing unit tests for cli filesStamatis Katsaounis4-0/+283
JIRA: DOVETAIL-724 This patch adds unit tests for cli methods of Dovetail which were missing. Change-Id: I99c584007659401e298e58aebb1764df1c543894 Signed-off-by: Stamatis Katsaounis <mokats@intracom-telecom.com>
2018-11-14Add missing unit tests for utils filesStamatis Katsaounis6-2/+1589
JIRA: DOVETAIL-724 This patch adds unit tests which were missing from dovetail code base. Furthermore it updates the test_parser existing unit test. Finally, it fixes some minor issues in dovetail_utils itself. Change-Id: I8fd7cd4f6b1ede11664914746d2279f062511639 Signed-off-by: Stamatis Katsaounis <mokats@intracom-telecom.com>
2018-06-29Update licence headers to comply with guidelinesGeorg Kunz1-1/+4
Updating the licence headers to comply with the community guidelines [1] and anteater checks. [1] https://wiki.opnfv.org/display/DEV/Contribution+Guidelines#ContributionGuidelines-License Change-Id: Idec787e32daf76c0b1bd6108977b78828125da5e Signed-off-by: Georg Kunz <georg.kunz@ericsson.com>
2018-03-06leverage data_files to eliminate so many hardcoded abs_path_seekingsSerenaFeng1-1/+4
1. mv conf/ userconfig/ compliance/ patch to etc/ 2. after installation etc/ will be put under /etc/dovetail 3. leveraging /etc/dovetail in coding Change-Id: Icf9cb00ff7fc7cf35755f60d3e258b23e2c70839 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-01-16dovetail tool: format improvementMatthewLi1-0/+1
Change-Id: Ibf0bb781c0f0b6be73526bf45231040e68510f76 Signed-off-by: MatthewLi <matthew.lijun@huawei.com>
2016-12-23dovetail tool: bugfix CI job dovetail-merge-master failxudan1-3/+4
JIRA: DOVETAIL-156 Change-Id: I3453571568494850049eb7956387ee7e275934af Signed-off-by: xudan <xudan16@huawei.com>
2016-12-21dovetail tool: fully tox supportedMatthewLi1-5/+5
JIRA: DOVETAIL-165 1, fully tox supported 2, previous easy setup abandoned 3, CI verify job changed accordingly 4, unittest bug fix this should merge after https://gerrit.opnfv.org/gerrit/#/c/26297/ results see https://etherpad.opnfv.org/p/dovetail_report Change-Id: I52ce3999fcde7e817854e4a39f4111eef081bc78 Signed-off-by: MatthewLi <matthew.lijun@huawei.com>
2016-12-15dovetail tool: move conf/dovetail_config.py into utils/xudan1-1/+1
1. move conf/dovetail_config.py into utils/ 2. change the open file path in dovetail_config.py 3. do some modification about all 'from conf.dovetail_config import ***' JIRA: DOVETAIL-158 Change-Id: I7670e6de993899e4e2a604cbc501dc3339896ef1 Signed-off-by: xudan <xudan16@huawei.com>
2016-12-13[dovetail tool] support shell scripts for testcase validationLeo Wang2-3/+7
JIRA: DOVETAIL-46 1. for now a testcase has two kinds of validation types(functest, yardstick), and it is not enough to check the complete funcionality 2. add new validation type(shell) for extra validation of the test case to make result more accurate and more convincing. Change-Id: I45dca6b8dbd888757da163189d261f6e4dba5034 Signed-off-by: Leo Wang <grakiss.wanglei@huawei.com>
2016-12-09[dovetail tool]: move config info from .py to config .yml fileMatthewLi1-2/+2
JIRA: DOVETAIL-145 Change-Id: Ia9b3c678f1a491e5daf2d280f05904ead3b0a296 Signed-off-by: MatthewLi <matthew.lijun@huawei.com>
2016-12-05dovetail tool: add unit test into script unittest.shxudan1-2/+3
1. Since JIRA: DOVETAIL-55 has been merged, unit tests can't pass without load_config_files(). 2. Fix the bug by adding load_config_files(). 3. Add run_tests() into script unittest.sh to include all unit tests in tests/unit. JIRA: DOVETAIL-149 Change-Id: I7bdb0732fefde3a3f3b82441b4cc7e46ece66a1e Signed-off-by: xudan <xudan16@huawei.com>
2016-11-30dovetail tool: fix unittest bugszshi1-1/+2
JIRA: DOVETAIL-143 1) fix unittest import module path 2) add create_log in setup Change-Id: Ic894fa971b4a5091affb36e8e6aac05e0e8623fb Signed-off-by: zshi <zshi@redhat.com>
2016-10-29dovetail tool: Add unit tests for 'parser' modulemathsyouth3-0/+67
JIRA: DOVETAIL-45 1. Add two '__init__.py' files for packages 2. Add two test functions in 'test_parser.py' to verify the function of the method 'parser_cmd' 3. 'test_testcase.yaml' is used in 'test_parser.py' Change-Id: Ic3e2e6e67bcac3276fe47ec5584c0d9632b5286a Signed-off-by: mathsyouth <linghui.zeng@huawei.com>