aboutsummaryrefslogtreecommitdiffstats
path: root/functest/tests
AgeCommit message (Collapse)AuthorFilesLines
2018-01-21Partially rewrite test_run_tests.pyCédric Ollivier1-75/+72
It mainly fixes pylint issues and leverages on decorators. It should be noted that run_tests.py is not fully covered (see xtesting requirements). Change-Id: I114b67c3c5bfe61d72d004829af513e2014ad8b8 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-01-21Fully test and cover functest/ci/tier_*Cédric Ollivier4-226/+305
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>
2018-01-21Move push_results_to_db to TestCaseCédric Ollivier3-188/+135
It removes the link between TestCase and Functest utils (xtesting). It should be noted that testresults url can only be set by env var. Co-Authored-By: Cédric Ollivier <cedric.ollivier@orange.com> Change-Id: Ie072c675890d0ae2e63619c599d2684a8c7d762d Signed-off-by: Jose Lausuch <jalausuch@suse.com> Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-01-16Fix Rally output retrievalJuha Kosonen1-11/+2
Read stdout until nothing left instead of stopping once the child process is terminated. Change-Id: I46a2eb93fd614e2e7ff676727eb9dc132c29d03f Signed-off-by: Juha Kosonen <juha.kosonen@nokia.com>
2017-12-27Execute feature command by subprocess directlyLinda Wang1-24/+26
Change-Id: I77e86af4e96310c6520d743e4d16c9a7b2e9adf5 Signed-off-by: Linda Wang <wangwulin@huawei.com>
2017-12-21Merge "Get auth token when checking deployment"Cedric Ollivier1-1/+4
2017-12-21Merge "Remove logger_test_results"Cedric Ollivier1-32/+0
2017-12-20Remove logger_test_resultsCédric Ollivier1-32/+0
It was only called in Feature which the result is already printed (see __str__()). It also eases moving Feature to xtesting as it breaks the link to functest_utils. Change-Id: Ib72d651dc7d89598704ff4d52d8b1ecb2bdade5b Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-12-20Get auth token when checking deploymentLinda Wang1-1/+4
JIRA: FUNCTEST-900 Change-Id: Ie313d273a357a35b176b3918de108d85164776fa Signed-off-by: Linda Wang <wangwulin@huawei.com>
2017-12-19Remove openstack_[clean,snapshot]Cédric Ollivier4-1079/+0
It also removes the related unit tests and updates docs and cli. Change-Id: Ie11f77402f2b5b7055a0c7c5d931c8ff21124482 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-12-19Delete TestCase.create_snapshot()Cédric Ollivier1-4/+0
OSGC has been removed then this method can be safely removed. It also updates run_tests.py. Change-Id: I4030b7f0351d24d095313ae990b08e65d8f69115 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-12-19Remove OSGCTestCaseCédric Ollivier1-43/+3
This class is no longer used and must be removed before working on xtesting. JIRA: FUNCTEST-887 Change-Id: I3ac1db6ec90d9db301e5461cd79cfcf77291dffc Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-12-14Improve the pylint score of functest-coreLinda Wang4-18/+23
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-12-12All patching config files in memoryLinda Wang1-50/+0
It adds the yaml content as Config attribute and allow patching it without modifying the file (and reimport constants or config). It also removes obsolete data in config_patch.yaml and moves several functions in the right modules (Config) JIRA: ARMBAND-334 Co-Authored-By: Cédric Ollivier <cedric.ollivier@orange.com> Change-Id: I5c9a574d3283828063154c977cdfbc2abfdc6777 Signed-off-by: Linda Wang <wangwulin@huawei.com> Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-12-12Ensure that all energy modules are fully coveredCédric Ollivier1-4/+44
Change-Id: I501a404d1202cc92da5e62dbf9db2aa453ffd324 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-12-12Merge "Add python3 support in cli"Cedric Ollivier1-2/+3
2017-12-12Merge "Add python3 support in energy"Cedric Ollivier1-1/+1
2017-12-12Merge "Mock time.sleep() to decrease test duration"Cedric Ollivier1-11/+24
2017-12-12Merge "Add python3 for Functest utils"Cedric Ollivier4-8/+15
2017-12-12Add python3 support in cliCédric Ollivier1-2/+3
Change-Id: I222fde91cf236a272176bc2d9ec6732f98b76141 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-12-12Add python3 support in energyCédric Ollivier1-1/+1
It also converts Exception to str when expected. All energy modules are also listed in files rated 10/10 by pylint. Change-Id: Id382d60eb35f50c98b15423f9559a920ce5dac62 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-12-12Mock time.sleep() to decrease test durationCédric Ollivier1-11/+24
It also returns None when getting floating ips after deleting them. It now runs 40 tests in 0.084s. Change-Id: If4b1032ab9890fd291d99beb57166ead8729d822 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-12-12Add python3 for Functest utilsCédric Ollivier4-8/+15
It also fixes test_utils RegexMatch and SubstrMatch. Change-Id: I124aa7d0c4110dcd2f50220aae7ba9b299799e93 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-12-11vEPC tests with juju as an VNF managersoumaya1-0/+95
juju_epc testcase validate EPC setup with the help of ABoT which acting as test executor. Functest-abot-epc-bundle deploys OAI charms alongwith mysql and ABoT. JUJU is acting as a VNF manager. Change-Id: I45d7b37f21f6b8c7049ab2bf42a4678e30b67a72 Signed-off-by: soumaya <soumaya.nayek@rebaca.com>
2017-12-11Add Python3 support in functest/ciCédric Ollivier2-3/+3
Change-Id: If13bfaa196b8dfab1e83feb28c5a4719c7acd8c7 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-12-06Fix the yamllint errors in functest/ciLinda Wang1-19/+6
And also, remove the params "tempest_use_custom_images" and "unique_names" of vping, rally and tempest. Change-Id: Ic4243ef2f5e965910e5befa87db8d585cad34fa2 Signed-off-by: Linda Wang <wangwulin@huawei.com>
2017-11-30Merge "Stop updating test_db_url in config file by env var"Linda Wang1-32/+2
2017-11-30Stop updating test_db_url in config file by env varLinda Wang1-32/+2
If TEST_DB_URL is declared in env variable, use it before considering the var in config file. Change-Id: I656ad8765287c48d60af7ab88b421805d76fb231 Signed-off-by: Linda Wang <wangwulin@huawei.com>
2017-11-30Skip modifying creds if Variables.robot is missingCédric Ollivier1-6/+17
Variable.robot is missing in functest-features [1]. As it's related to ODL csit suites, modifying it could be safely skipped as odl.py is designed for testing multiple ODL testcases. [1] https://gerrit.opnfv.org/gerrit/#/c/46225/ Change-Id: Id5f1947a073d251ef7480f418218a4c85fe078c1 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-11-29Remove one obsolete test in test_odl.pyCédric Ollivier1-3/+0
It completes "Create RobotFramework class" [1] which decreased coverage to 99% (test_odl.py) [1] https://gerrit.opnfv.org/gerrit/#/c/47841/ Change-Id: I2a2d448daeb6d1f50064588167cafd32e07aa502 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-11-29Cover vnf.prepare()Cédric Ollivier1-5/+63
It completes the previous commit [1] which increased the coverage of Vnf. [1] https://gerrit.opnfv.org/gerrit/#/c/47851/ Change-Id: Ibb0201d6165d89da2edd1a93b722008092726569 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-11-27Fully cover vnfCédric Ollivier1-43/+12
clean() is now covered by unit tests. It must be noted that clean() doesn't warn about the possible failures when cleaning resources. Change-Id: If64c0cc5777ac5d2ce8a04ea34cd4f50091ab273 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-11-27Create RobotFramework classCédric Ollivier2-113/+195
It moves the capability to run any robot script from ODL TestCase into a new class: RobotFramework. It updates ODL TestCase and the related unit tests to inherit from the new parent class. Change-Id: I73e59ee9652fb63d9d89d7c75c58cce9cf62b0d7 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-11-23Merge "Remove openstack utils calls in rally and tempest"Cedric Ollivier1-11/+2
2017-11-23Merge "Remove prepare_env"Cedric Ollivier5-96/+88
2017-11-23Remove openstack utils calls in rally and tempestLinda Wang1-11/+2
Mainly, update "rally deployment create --file=rally_conf.json" to "rally deployment create --fromenv" Change-Id: I6dd4c7ea2d9d6f47dee49a4fd416e62bd557f45e Signed-off-by: Linda Wang <wangwulin@huawei.com>
2017-11-22Remove prepare_envJose Lausuch5-96/+88
After moving the rally installation out of prepare_env It doesn't much sense to keep this script as it doesn't do useful things any more. Change-Id: I9ab3b2dd30c8ec0fbb825ee4302a83cce80f1cbe Signed-off-by: Jose Lausuch <jalausuch@suse.com>
2017-11-22Merge "Removal of deprecated SNAPS-OO classes."Cedric Ollivier1-18/+22
2017-11-21Removal of deprecated SNAPS-OO classes.spisarski1-18/+22
JIRA: SNAPS-202 Change-Id: I115b4927b287a5525f4c1b95128d91f5229c7856 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-11-21Fix "Broken pipe" IOErrors of rally runJuha Kosonen1-4/+1
Replace obsolete os.popen with subprocess module usage in command output retrieval. Do not use shell as the program to execute. Change-Id: Ic63bb0f393750c3b85a35a37fecd46c1c1b96602 Signed-off-by: Juha Kosonen <juha.kosonen@nokia.com>
2017-11-17Check external networkLinda Wang1-0/+17
Change-Id: I1ff199fcad99aefccb92807c8f416d4f32ec91a6 Signed-off-by: Linda Wang <wangwulin@huawei.com>
2017-11-15Merge "Remove opnfv module from functest-core"Jose Lausuch1-389/+0
2017-11-15Update unit test related to vyos_vrouterMorgan Richomme1-9/+11
Utilvnf is now mocked to stop triggering the git clone of an external repo and creating dirs. Else we may get errors when testing offline. Co-Authored-By: Cédric Ollivier <cedric.ollivier@orange.com> Change-Id: Ia7e86593ecca9b9add747ef89b1d5e8d6bdb2d7c Signed-off-by: Morgan Richomme <morgan.richomme@orange.com> Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-11-15Remove opnfv module from functest-coreLinda Wang1-389/+0
The releng/opnfv git repo is still kept in upper-constraints as it is required by sfc. And also delete the functions of check_env_variables, get_deployment_handler and create_directories. Change-Id: If498e68f0f94d6ebde1be55f5e3a17d06becaea4 Signed-off-by: Linda Wang <wangwulin@huawei.com>
2017-11-13Move rally and tempest out of functest-coreLinda Wang3-91/+79
JIRA: FUNCTEST-889 Change-Id: I96776da7af50b2c33c34dd731b5500b891d263d6 Signed-off-by: Linda Wang <wangwulin@huawei.com>
2017-11-10Select the subset of snaps test casesLinda Wang1-12/+24
Change-Id: I03e422d5dae0ced9cd7a5477c31359ffc7795c42 Signed-off-by: Linda Wang <wangwulin@huawei.com>
2017-10-17Update blacklist about migration tests for rallyLinda Wang1-2/+2
The test NovaServers.boot_and_migrate_server needs at least 2 compute nodes: https://github.com/openstack/rally/blob/stable/0.9/rally/plugins/openstack/scenarios/nova/servers.py#L763-L765 Change-Id: I4ddf99188094ced57225d886037b00e91f3b68e6 Signed-off-by: Linda Wang <wangwulin@huawei.com>
2017-10-05Live migration support determination in rallyJuha Kosonen1-7/+24
Live migration test cases were excluded if tempest was not executed before rally since tempest config file is created during the execution of tempest. Remove the dependency to config file and define the support based on the number of computes as done in tempest. Change-Id: I57c18b7c57e6a4bc8bfbdfb4beb5f8d67c6269c4 Signed-off-by: Juha Kosonen <juha.kosonen@nokia.com>
2017-09-28Merge "Switch to OS_PROJECT_NAME"Cedric Ollivier1-13/+15
2017-09-28Fix connection error due to invalid lib version usage.Benoit HERARD1-1/+1
Connection timeouts on "requests" objects was developped with requests 2.18 but target runtime is 2.12. Advanced timeout management of 2.18 is not available in 2.12. Change-Id: Ie6d81b91d4bcc0d73cffd007d9e46cdb19e47597 Signed-off-by: Benoit HERARD <benoit.herard@orange.com>