aboutsummaryrefslogtreecommitdiffstats
path: root/functest/tests
AgeCommit message (Collapse)AuthorFilesLines
2018-02-13Simplify functest/cli/commands/cli_env.pyCédric Ollivier1-6/+0
CONST shouldn't be used for getting/setting env vars. It adds complexity and may raise side effects. It also removes the obsolete env var CI_DEBUG. Change-Id: I8a8fde0fa781351d5eabd2698ca8aae9dee76fb8 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-02-13Merge "Export env vars via os.environ in test_openstack_utils.py"Cedric Ollivier1-2/+2
2018-02-13Merge "Enable invalid-name warnings in tempest modules"Linda Wang2-55/+56
2018-02-12Merge "Export env vars via os.environ in test_cli_env.py"Cedric Ollivier1-7/+7
2018-02-12Enable invalid-name warnings in tempest modulesJuha Kosonen2-55/+56
Do not suppress pylint invalid-name warnings but conform the naming convention. Change-Id: I324d25b3081fe8a366249559b343c1b9cacadb21 Signed-off-by: Juha Kosonen <juha.kosonen@nokia.com>
2018-02-12Merge "Fix pylint errors/warnings in tempest modules"Cedric Ollivier2-47/+56
2018-02-12Export env vars via os.environ in test_openstack_utils.pyCédric Ollivier1-2/+2
CONST shouldn't be used for getting/setting env vars. It adds complexity and may raise side effects. Change-Id: I8319748dd2f0abb95b82a2f65191cac8ccba7f5e Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-02-12Export env vars via os.environ in test_cli_env.pyCédric Ollivier1-7/+7
CONST shouldn't be used for getting/setting env vars. It adds complexity and may raise side effects. Change-Id: Id80a03aff6eb908a792f1d07addaad4770e8d0cb Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-02-09Read the env file only if existsCédric Ollivier1-1/+2
Change-Id: I8e718e583a5a47a089755c31e623a44732e5ba1e Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-02-09Ensure logging is disabled when unit testing featureCédric Ollivier1-3/+6
Change-Id: Ibe08477a8b50a6c9b71ab4e5b0ebaaab36692b08 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-02-09Merge "Unlink vnf from constants"Cedric Ollivier1-12/+4
2018-02-09Merge "Unlink run_tests from constants"Cedric Ollivier1-7/+5
2018-02-09Fix pylint errors/warnings in tempest modulesJuha Kosonen2-47/+56
JIRA: FUNCTEST-913 Change-Id: I37b25bbcf43fb1d6f7de0c815ad49070d1e1af12 Signed-off-by: Juha Kosonen <juha.kosonen@nokia.com>
2018-02-09Merge "Unlink Energy from functest utils and constants"Cedric Ollivier1-48/+34
2018-02-09Merge "Move get_dict_by_test() into run_tests.py"Cedric Ollivier2-32/+17
2018-02-09Unlink vnf from constantsCédric Ollivier1-12/+4
It generates a default description which all testcases can easily override. Change-Id: I81b97c394cf064088767cc934295602f01a7f739 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-02-09Unlink run_tests from constantsCédric Ollivier1-7/+5
run_tests.py doesn't read any functest config file what is mandatory for xtesting. Change-Id: I49f672c54a606acead75f573d1ce496c81fb235a Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-02-09Unlink Energy from functest utils and constantsCédric Ollivier1-48/+34
It requires an update of releng jobs which have to export ENERGY_RECORDER_API_URL = http://energy.opnfv.fr/resources Change-Id: Iecd5d49b4d4c961c9dc51e43e54df1fcd4027266 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-02-09Move get_dict_by_test() into run_tests.pyCédric Ollivier2-32/+17
It also removes functest_utils.get_criteria_by_test() Change-Id: I3f265642acd053755e32f8e92f1086b93517c247 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-02-08Get neutron endpoint via snaps in odlCédric Ollivier1-82/+70
Change-Id: Iaf0e451e7f6bd7d22459f8d3509b39773527cfea Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-02-08Move source_credentials() into run_tests.pyCédric Ollivier2-34/+34
It's also renamed source_envfile(). Change-Id: I0e7c38c2def125961f86dc2bc9a63cfb6ad87c03 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-02-07Add variablefile as possible robot.run() argsCédric Ollivier2-10/+16
Change-Id: Ic80840957b4d9c3c4a1615696a2851f3f5bf7bf4 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-02-02Do not use shell to execute commands in tempestJuha Kosonen1-4/+3
Change-Id: I4d699481fdc63058c12ca9cfe18138e87025e9b3 Signed-off-by: Juha Kosonen <juha.kosonen@nokia.com>
2018-02-01Rename a common credential file for OS and K8SLinda Wang3-30/+16
Change-Id: Ib8d24be4b29ab1de00d5dd5e3442146b2437cb94 Signed-off-by: Linda Wang <wangwulin@huawei.com>
2018-01-31Use snaps_utils to get credentials in tempestJuha Kosonen2-3/+6
Change-Id: I1d240d5edd536d71c87a7dff4e2676715697d0e2 Signed-off-by: Juha Kosonen <juha.kosonen@nokia.com>
2018-01-30Fix pylint errors/warnings in rallyJuha Kosonen1-32/+24
JIRA: FUNCTEST-906 Change-Id: I484f9a291d5adbedb855450e4ff067dfa4a3b2ae Signed-off-by: Juha Kosonen <juha.kosonen@nokia.com>
2018-01-30Merge "Remove duplicated code related to snaps creds"Cedric Ollivier1-1/+1
2018-01-30Remove duplicated code related to snaps credsJuha Kosonen1-1/+1
Add support for providing credentials in snaps_utils. JIRA: FUNCTEST-916 Change-Id: I3e027229d213d3791a115920f7012309cc027712 Signed-off-by: Juha Kosonen <juha.kosonen@nokia.com>
2018-01-29Fix pylint errors about refstackLinda Wang1-6/+4
JIRA: FUNCTEST-907 Change-Id: Ib08a88523c700d35894b9b89b7585425a02065c3 Signed-off-by: Linda Wang <wangwulin@huawei.com>
2018-01-29Merge "Enable epc unit tests"Cedric Ollivier2-0/+1
2018-01-29Merge "Fix warnings in all snaps-related modules"Cedric Ollivier3-133/+197
2018-01-29Merge "Fix pylint errors in several utils modules"Cedric Ollivier1-6/+6
2018-01-29Merge "Avoid duplicating get_parameter_from_yaml"Cedric Ollivier1-2/+1
2018-01-29Merge "Fix last Pylint error in Functest"Cedric Ollivier1-12/+15
2018-01-29Enable epc unit testsCédric Ollivier2-0/+1
It adds the missing __init__.py to activate vepc unit tests. They are disabled because they are currently false (otherwise it would block next changes). Change-Id: I65b32490efde4cc8f6b3d9e6ee19257dcf02c2dd Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-01-29Fix the connect issue when checking deploymentLinda Wang1-4/+4
Socket.connect() requires only one param with type tuple. Change-Id: I63aa4633e80bde3ad5e1b5af9d67d8f46eb84571 Signed-off-by: Linda Wang <wangwulin@huawei.com>
2018-01-28Fix warnings in all snaps-related modulesCédric Ollivier3-133/+197
It also adds vping/__init__.py to stop skipping vping unit tests. It removes the useless import os which is not required for mock (here the mock patch was simply false). It should be noted that the code is partially duplicated between snaps_test_runner.py and vping_base_base.py. A small part of code has been rewritten to fix that without multi inheritance. Change-Id: I2e3e181ad7dab8aa41afb1e63d0b6795ff0d1610 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-01-27Merge "Refactor rally report generation"Cedric Ollivier1-2/+12
2018-01-26Fix pylint errors in several utils modulesCédric Ollivier1-6/+6
All utils which are moving to xtesting are now fixed. It remains OpenStack and Functest utils (+ the related unit tests) which doesn't move to the new package. Change-Id: If13c627c8444c62d5c6bf9c8057d6413aa0e56c7 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-01-26Avoid duplicating get_parameter_from_yamlCédric Ollivier1-2/+1
It switches to this helper which was locally copied. Change-Id: Iaa30d83e8c0e2d4472f4ef8fe1da4943e424ebb3 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-01-26Fix last Pylint error in FunctestCédric Ollivier1-12/+15
It also fixes all pylint warnings in router and the related unit tests. tox.ini is updated to ensure that no error is introduced. Change-Id: Iddd74b0dac7b6581d72b04369140006c9e19f998 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-01-26Refactor rally report generationJuha Kosonen1-2/+12
- statistic data based on Rally results report - fix statistics calculations - use PrettyTable in generating the report Change-Id: Ic84adc5e30d446aea1f3045ba997c3ddf895e9f5 Signed-off-by: Juha Kosonen <juha.kosonen@nokia.com>
2018-01-24Fix pylint warnings/errors in cliCédric Ollivier5-40/+35
cli_testcase and cli_tier have been refactored to avoid duplicating code. Then functest/cli and funtest/unit/cli can be added to the list of modules rated 10/10. Change-Id: Iec90e806397248a10f39080ec554e3f0a6eda7c1 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-01-24Delete functest_vacation.pyCédric Ollivier1-5/+0
Change-Id: Id0e2769a1989e6778ae41f67ed634e2e5002a83d Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-01-24Merge RegexMatch into test_cli_env.pyCédric Ollivier2-34/+13
It also deletes SubstrMatch which is not called (then uncovered). Change-Id: Ifde1e2491ab5e0e75652eb4b25b359e859c2aa95 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-01-21Disable all missing-docstring warnings in unit testsCédric Ollivier18-2/+33
Change-Id: I22b7bbdab5f000b4ade6c2ba3a4029c146887cbd Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
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>