functest.git
7 years agoCall fetch_os_creds.sh from $PATH 69/35169/3
Linda Wang [Tue, 23 May 2017 02:39:25 +0000 (02:39 +0000)]
Call fetch_os_creds.sh from $PATH

Now it's defined as script in releng/modules' setup.py [1]

[1] https://gerrit.opnfv.org/gerrit/#/c/35183/

Co-Authored-By: Cédric Ollivier <cedric.ollivier@orange.com>
Depends-On: Ic77f4e46d6d3396f9891b73105a0eb7aa037754f
JIRA: FUNCTEST-829

Change-Id: Ief821b7326e0a6c2bbcab31bb21629455e4bc9ea
Signed-off-by: Linda Wang <wangwulin@huawei.com>
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
7 years agoMerge "Bugfix: fix the errors of onos_sfc"
Morgan Richomme [Mon, 22 May 2017 20:03:44 +0000 (20:03 +0000)]
Merge "Bugfix: fix the errors of onos_sfc"

7 years agoMerge "Update test_vnf.py to support py3"
valentin boucher [Mon, 22 May 2017 16:28:47 +0000 (16:28 +0000)]
Merge "Update test_vnf.py to support py3"

7 years agoMerge "Remove former run_unit_tests.sh"
valentin boucher [Mon, 22 May 2017 16:28:18 +0000 (16:28 +0000)]
Merge "Remove former run_unit_tests.sh"

7 years agoMerge "Test decorators.py in testenv:py35"
Cedric Ollivier [Mon, 22 May 2017 15:56:52 +0000 (15:56 +0000)]
Merge "Test decorators.py in testenv:py35"

7 years agoMerge "Turn Sphinx warnings into errors"
Cedric Ollivier [Mon, 22 May 2017 15:56:33 +0000 (15:56 +0000)]
Merge "Turn Sphinx warnings into errors"

7 years agoMerge "Check python3 support when running tox"
valentin boucher [Mon, 22 May 2017 13:12:55 +0000 (13:12 +0000)]
Merge "Check python3 support when running tox"

7 years agoMerge "Generate api doc when running tox"
valentin boucher [Mon, 22 May 2017 13:12:46 +0000 (13:12 +0000)]
Merge "Generate api doc when running tox"

7 years agoMerge "Update apidoc to conform with vnf module"
valentin boucher [Mon, 22 May 2017 13:12:19 +0000 (13:12 +0000)]
Merge "Update apidoc to conform with vnf module"

7 years agoMerge "Analyse code when running tox"
valentin boucher [Mon, 22 May 2017 13:11:45 +0000 (13:11 +0000)]
Merge "Analyse code when running tox"

7 years agoMerge "Check style when running tox"
valentin boucher [Mon, 22 May 2017 13:11:37 +0000 (13:11 +0000)]
Merge "Check style when running tox"

7 years agoMerge "Delete line breaks before binary operator"
valentin boucher [Mon, 22 May 2017 13:11:04 +0000 (13:11 +0000)]
Merge "Delete line breaks before binary operator"

7 years agoMerge "Sort keys when dumping json"
valentin boucher [Mon, 22 May 2017 13:09:56 +0000 (13:09 +0000)]
Merge "Sort keys when dumping json"

7 years agoMerge "Ignore .tox"
valentin boucher [Mon, 22 May 2017 13:09:50 +0000 (13:09 +0000)]
Merge "Ignore .tox"

7 years agoMerge "Tox utility to run unit tests"
valentin boucher [Mon, 22 May 2017 13:09:23 +0000 (13:09 +0000)]
Merge "Tox utility to run unit tests"

7 years agoMerge "Update requests as defined in releng"
valentin boucher [Mon, 22 May 2017 13:09:12 +0000 (13:09 +0000)]
Merge "Update requests as defined in releng"

7 years agoMerge "Add baro_tests as requirements"
valentin boucher [Mon, 22 May 2017 13:09:00 +0000 (13:09 +0000)]
Merge "Add baro_tests as requirements"

7 years agoMerge "Install releng via requirements.txt"
valentin boucher [Mon, 22 May 2017 13:08:51 +0000 (13:08 +0000)]
Merge "Install releng via requirements.txt"

7 years agoMerge "Set default value for CONFIG_FUNCTEST_YAML"
valentin boucher [Mon, 22 May 2017 13:08:45 +0000 (13:08 +0000)]
Merge "Set default value for CONFIG_FUNCTEST_YAML"

7 years agoMerge "Fully cover pytest_suite_runner.py"
valentin boucher [Mon, 22 May 2017 13:07:52 +0000 (13:07 +0000)]
Merge "Fully cover pytest_suite_runner.py"

7 years agoMerge "Precise self.result in pytest_suite_runner.py"
valentin boucher [Mon, 22 May 2017 13:07:45 +0000 (13:07 +0000)]
Merge "Precise self.result in pytest_suite_runner.py"

7 years agoMerge "Print stack when catching exceptions in run_tests.py"
valentin boucher [Mon, 22 May 2017 12:43:36 +0000 (12:43 +0000)]
Merge "Print stack when catching exceptions in run_tests.py"

7 years agoMerge "Replace CONST.* by getattribute/setattr for refstack"
Morgan Richomme [Mon, 22 May 2017 07:08:13 +0000 (07:08 +0000)]
Merge "Replace CONST.* by getattribute/setattr for refstack"

7 years agoUpdate test_vnf.py to support py3 27/35127/1
Cédric Ollivier [Mon, 22 May 2017 02:04:06 +0000 (04:04 +0200)]
Update test_vnf.py to support py3

Change-Id: I86dc83b1fc9205f7b8209d63e18439a7e05c646b
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
7 years agoTest decorators.py in testenv:py35 25/35125/1
Cédric Ollivier [Mon, 22 May 2017 01:47:21 +0000 (03:47 +0200)]
Test decorators.py in testenv:py35

Change-Id: I91d5b04f105cf41bef799eccdaabf89cb0440747
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
7 years agoTurn Sphinx warnings into errors 23/35123/1
Cédric Ollivier [Mon, 22 May 2017 01:37:13 +0000 (03:37 +0200)]
Turn Sphinx warnings into errors

Change-Id: Iefc223a9fa6dbc4e9476aca84b3df4304058862b
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
7 years agoRemove former run_unit_tests.sh 09/35109/1
Cédric Ollivier [Sun, 21 May 2017 13:23:38 +0000 (15:23 +0200)]
Remove former run_unit_tests.sh

Depends-On: I934f4ac739d99d0cb29bea8c6aac6d6780b30901

Change-Id: I67c8a25a2e712babf99e32fb4c049b0acfd2e44d
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
7 years agoCheck python3 support when running tox 07/35107/1
Cédric Ollivier [Sun, 21 May 2017 13:16:31 +0000 (15:16 +0200)]
Check python3 support when running tox

It only tests testcase, feature and odl which supports python3.
It creates a temporary requirements.py3.txt which will be safely removed
when we stop using subprocess32 [1] and robotframework-sshlibrary.

[1] https://jira.opnfv.org/browse/FUNCTEST-827

Change-Id: I92021dcb4aca03f64e2441e3bcff34675a3ae879
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
7 years agoGenerate api doc when running tox 05/35105/2
Cédric Ollivier [Sun, 21 May 2017 10:27:24 +0000 (12:27 +0200)]
Generate api doc when running tox

Change-Id: I78b18981d9f916e6174d44c6280706e404c7c9f2
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
7 years agoUpdate apidoc to conform with vnf module 03/35103/1
Cédric Ollivier [Sun, 21 May 2017 10:01:43 +0000 (12:01 +0200)]
Update apidoc to conform with vnf module

It completes [1].

[1] https://gerrit.opnfv.org/gerrit/#/c/34467/

Change-Id: Ia4a850b740764774b926d5cdb92c8813bc93f9e4
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
7 years agoAnalyse code when running tox 01/35101/1
Cédric Ollivier [Sun, 21 May 2017 09:50:56 +0000 (11:50 +0200)]
Analyse code when running tox

It filters all messages to ease reading the report.

Change-Id: Iab55bc71cb6026edde29fb9f084a07b2dedf564f
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
7 years agoCheck style when running tox 99/35099/2
Cédric Ollivier [Sun, 21 May 2017 08:42:48 +0000 (10:42 +0200)]
Check style when running tox

Change-Id: Idedf823a1572c40692e445694461b4196b75275d
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
7 years agoDelete line breaks before binary operator 97/35097/1
Cédric Ollivier [Sun, 21 May 2017 08:34:49 +0000 (10:34 +0200)]
Delete line breaks before binary operator

They are considered as warnings by flake8.

Change-Id: I84ffedc41c24133aa0d45e312bb095526aa1095b
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
7 years agoSort keys when dumping json 95/35095/1
Cédric Ollivier [Sun, 21 May 2017 08:13:45 +0000 (10:13 +0200)]
Sort keys when dumping json

Otherwise dumping them could break some unit tests as they are
unordered collections [1].

[1] https://build.opnfv.org/ci/job/functest-verify-master/4122/

Change-Id: I108e946926ae9690cf2421e565f2bb81500f9160
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
7 years agoIgnore .tox 93/35093/1
Cédric Ollivier [Sun, 21 May 2017 07:23:49 +0000 (09:23 +0200)]
Ignore .tox

Change-Id: I50e39057edbbfadd57ea912f1f1ba32389639809
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
7 years agoTox utility to run unit tests 71/33671/10
ashishk1994 [Sat, 22 Apr 2017 16:40:31 +0000 (22:10 +0530)]
Tox utility to run unit tests

Now run_unit_tests.sh only calls tox to allow merging.
It can be safely deleted as soon as the related jjob is updated.

It also removes test_logging.ini.

Co-Authored-By: Cédric Ollivier <cedric.ollivier@orange.com>
Change-Id: I934f4ac739d99d0cb29bea8c6aac6d6780b30901
Signed-off-by: ashishk1994 <ashishk.iiit@gmail.com>
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
7 years agoUpdate requests as defined in releng 73/35073/5
Cédric Ollivier [Fri, 19 May 2017 21:32:33 +0000 (23:32 +0200)]
Update requests as defined in releng

Change-Id: I808cb796d18cf7f193a37e7b7d9073a037bb2ae7
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
7 years agoAdd baro_tests as requirements 83/35083/1
Cédric Ollivier [Sat, 20 May 2017 09:57:35 +0000 (11:57 +0200)]
Add baro_tests as requirements

It also stops cloning it when building the docker container and updates
the related unit tests.

It bypasses the bug when importing collectd [1].

[1] https://jira.opnfv.org/browse/BAROMETER-79

Change-Id: Ie9f8ea2b3c95d6b1f5405d76b018cdcb62343a58
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
7 years agoInstall releng via requirements.txt 71/35071/6
Cédric Ollivier [Fri, 19 May 2017 21:11:21 +0000 (23:11 +0200)]
Install releng via requirements.txt

It should work in all branches if the right requirements.txt is
selected.

Change-Id: I9c46cd52496528835a92e371320debf92117b4fa
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
7 years agoSet default value for CONFIG_FUNCTEST_YAML 69/35069/2
Cédric Ollivier [Fri, 19 May 2017 20:23:52 +0000 (22:23 +0200)]
Set default value for CONFIG_FUNCTEST_YAML

It calculates via the full path of env.py.

Change-Id: Ief958833f5116cdb116d0153d85a0ae03063ec5c
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
7 years agoActivating SDNVPN test cases for master. 51/35051/2
Tim Irnich [Fri, 19 May 2017 11:48:27 +0000 (13:48 +0200)]
Activating SDNVPN test cases for master.

Change-Id: I4ba995d412bfeadc708d5a3c643576097867d1ac
Signed-off-by: Tim Irnich <tim.irnich@ericsson.com>
7 years agoBugfix: fix the errors of onos_sfc 19/34419/2
Linda Wang [Mon, 8 May 2017 07:01:33 +0000 (07:01 +0000)]
Bugfix: fix the errors of onos_sfc

1. Update the service type to "identity", "network", "compute" and
   "image", other than "keystone", "neutron", "nova" and "glance".

JIRA: FUNCTEST-820

Change-Id: I81b2311760fd717570561e6471525773378ad2f2
Signed-off-by: Linda Wang <wangwulin@huawei.com>
7 years agoFully cover pytest_suite_runner.py 49/35049/2
Cédric Ollivier [Fri, 19 May 2017 09:29:26 +0000 (11:29 +0200)]
Fully cover pytest_suite_runner.py

Change-Id: I766afb1d5c6ef53a5b551539662ee363ae8eadee
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
7 years agoPrecise self.result in pytest_suite_runner.py 29/35029/2
Cédric Ollivier [Fri, 19 May 2017 06:04:12 +0000 (08:04 +0200)]
Precise self.result in pytest_suite_runner.py

It also adds the related unit tests.

Change-Id: I8325bd9a55c69b229e3c48a9e64aa963e685e03d
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
7 years agoMerge "Replace CONST.* by getattribute/setattr for rally and tempest"
Jose Lausuch [Fri, 19 May 2017 09:16:30 +0000 (09:16 +0000)]
Merge "Replace CONST.* by getattribute/setattr for rally and tempest"

7 years agoMerge "Define Runner class"
Jose Lausuch [Fri, 19 May 2017 08:59:27 +0000 (08:59 +0000)]
Merge "Define Runner class"

7 years agoReplace CONST.* by getattribute/setattr for refstack 49/34949/3
Linda Wang [Thu, 18 May 2017 08:09:39 +0000 (08:09 +0000)]
Replace CONST.* by getattribute/setattr for refstack

Directories affected:
 - functest/opnfv_tests/openstack/refstack_client
and respective unit test

JIRA: FUNCTEST-796

Change-Id: I7f7047d44d71e82bcc1f66ec0b760ff30a13dbd5
Signed-off-by: Linda Wang <wangwulin@huawei.com>
7 years agoReplace CONST.* by getattribute/setattr for rally and tempest 41/34941/3
Linda Wang [Thu, 18 May 2017 07:17:27 +0000 (07:17 +0000)]
Replace CONST.* by getattribute/setattr for rally and tempest

Directories affected:
 - functest/opnfv_tests/openstack/rally
 - functest/opnfv_tests/openstack/tempest
and respective unit test

JIRA: FUNCTEST-796

Change-Id: I963f5947663f0b660337f3304defb697f5d338f3
Signed-off-by: Linda Wang <wangwulin@huawei.com>
7 years agoMerge "Modify how to disable logging in unit test."
Jose Lausuch [Fri, 19 May 2017 08:40:43 +0000 (08:40 +0000)]
Merge "Modify how to disable logging in unit test."

7 years agoMerge "Documentation for unit test project"
Morgan Richomme [Fri, 19 May 2017 08:37:34 +0000 (08:37 +0000)]
Merge "Documentation for unit test project"

7 years agoMerge "Use StringIO in odl.py"
Morgan Richomme [Fri, 19 May 2017 08:36:54 +0000 (08:36 +0000)]
Merge "Use StringIO in odl.py"

7 years agoMerge "Move few local ODL SFC confs to global functest confs"
Morgan Richomme [Fri, 19 May 2017 08:36:00 +0000 (08:36 +0000)]
Merge "Move few local ODL SFC confs to global functest confs"

7 years agoMerge "Replace CONST.* by getattribute/setattr for cli"
Morgan Richomme [Fri, 19 May 2017 08:34:18 +0000 (08:34 +0000)]
Merge "Replace CONST.* by getattribute/setattr for cli"

7 years agoPrint stack when catching exceptions in run_tests.py 01/35001/4
Cédric Ollivier [Thu, 18 May 2017 18:19:45 +0000 (20:19 +0200)]
Print stack when catching exceptions in run_tests.py

Change-Id: Id94475dd519ce04b87da470f6e6bb5a1c1aa2d75
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
7 years agoMerge "Add a new directory to hold pre-downloaded images"
Helen Yao [Fri, 19 May 2017 01:59:13 +0000 (01:59 +0000)]
Merge "Add a new directory to hold pre-downloaded images"

7 years agoMerge "Use logger instead of printing in console"
Jose Lausuch [Thu, 18 May 2017 18:31:52 +0000 (18:31 +0000)]
Merge "Use logger instead of printing in console"

7 years agoModify how to disable logging in unit test. 99/34999/1
Cédric Ollivier [Thu, 18 May 2017 17:37:26 +0000 (19:37 +0200)]
Modify how to disable logging in unit test.

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>
7 years agoMerge "Remove check_success_rate"
Jose Lausuch [Thu, 18 May 2017 16:44:19 +0000 (16:44 +0000)]
Merge "Remove check_success_rate"

7 years agoUse StringIO in odl.py 89/34989/1
Cédric Ollivier [Thu, 18 May 2017 15:26:49 +0000 (17:26 +0200)]
Use StringIO in odl.py

It avoids creating and removing the temporary file to dump robot output.

Change-Id: Ia5ea66e76ffb8b8327f2da938f177e8ef4c61dd4
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
7 years agoMerge "Fix 2 issues related to logger in pytest_suite_runer.py"
Jose Lausuch [Thu, 18 May 2017 15:02:45 +0000 (15:02 +0000)]
Merge "Fix 2 issues related to logger in pytest_suite_runer.py"

7 years agoMerge "Allow running unittest.TestCase via run_tests.py"
Jose Lausuch [Thu, 18 May 2017 15:02:11 +0000 (15:02 +0000)]
Merge "Allow running unittest.TestCase via run_tests.py"

7 years agoUse logger instead of printing in console 85/34985/1
Cédric Ollivier [Thu, 18 May 2017 14:40:13 +0000 (16:40 +0200)]
Use logger instead of printing in console

It modifies pytest_suite_runner.py to dump unit test results in
functest.log via logging.

Change-Id: Ic4e7567c5e52e00ad0e485ccb070029b135041b2
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
7 years agoMerge "Clean test-requirements.txt"
Jose Lausuch [Thu, 18 May 2017 12:28:43 +0000 (12:28 +0000)]
Merge "Clean test-requirements.txt"

7 years agoRemove check_success_rate 97/34897/10
jose.lausuch [Wed, 17 May 2017 12:20:43 +0000 (14:20 +0200)]
Remove check_success_rate

After the introduction of is_successful method
in TestCase class, this is not needed anymore.

Change-Id: I70f6f9e10495601cd5443467347b97efe27b81a3
Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
7 years agoMerge "Fix the opera ims instance initialization error"
Jose Lausuch [Thu, 18 May 2017 09:30:31 +0000 (09:30 +0000)]
Merge "Fix the opera ims instance initialization error"

7 years agoReplace CONST.* by getattribute/setattr for cli 55/34955/1
Linda Wang [Thu, 18 May 2017 08:35:48 +0000 (08:35 +0000)]
Replace CONST.* by getattribute/setattr for cli

Directories affected:
 - functest/cli/commands
and respective unit test

JIRA: FUNCTEST-796

Change-Id: I2ad721819d4b8f97098c589c3b5ed3dcc945409d
Signed-off-by: Linda Wang <wangwulin@huawei.com>
7 years agoAdd a new directory to hold pre-downloaded images 33/34033/20
helenyao [Tue, 2 May 2017 06:24:22 +0000 (14:24 +0800)]
Add a new directory to hold pre-downloaded images

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>
7 years agoFix 2 issues related to logger in pytest_suite_runer.py 27/34927/1
Cédric Ollivier [Wed, 17 May 2017 22:46:45 +0000 (00:46 +0200)]
Fix 2 issues related to logger in pytest_suite_runer.py

logging.ini requires the full name otherwise all log messages are lost.
Calling basicConfig() is useless as it has been correctly configured by
run_tests.py before.

Change-Id: I03663c01f795b1b844239a9e24379faa529829aa
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
7 years agoAllow running unittest.TestCase via run_tests.py 25/34925/1
Cédric Ollivier [Wed, 17 May 2017 22:26:26 +0000 (00:26 +0200)]
Allow running unittest.TestCase via run_tests.py

pytest_suite_runner can run any unittest.TestCase thanks to name passed
as run arg. Here is the related functest/ci/testcases.yaml:

  run:
      module: 'functest.core.pytest_suite_runner'
      class: 'PyTestSuiteRunner'
      args:
          name: 'functest.tests.unit.odl.test_odl'

Change-Id: I7c2c611c4afbad1e52bfdca4a3288ccc21491389
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
7 years agoClean test-requirements.txt 05/34905/2
Cédric Ollivier [Wed, 17 May 2017 15:41:15 +0000 (17:41 +0200)]
Clean test-requirements.txt

Now only the mandatory requirements related to unit testing are listed
in test-requirements.txt.

Change-Id: I2f17a9e18e90d779ddc80b1ace9ac770a76c3385
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
7 years agoUpdate self.result value to INT 93/34893/6
jose.lausuch [Wed, 17 May 2017 12:17:21 +0000 (14:17 +0200)]
Update self.result value to INT

So far, the test cases are storing a string "PASS" "FAIL"
in the self.result variable.
The way the new framework works is with INT Values.

Change-Id: I45e8693327740faadd8254b21569adfb2cefa6c8
Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
7 years agoMerge "Conform constants.py with the minimal standards"
Cedric Ollivier [Wed, 17 May 2017 11:46:38 +0000 (11:46 +0000)]
Merge "Conform constants.py with the minimal standards"

7 years agoConform constants.py with the minimal standards 77/34877/5
Cédric Ollivier [Wed, 17 May 2017 05:44:27 +0000 (07:44 +0200)]
Conform constants.py with the minimal standards

It adds the shebang to constants.py and its dependencies and stops
importing from a relative path. It stops printing obsolete values too.

It adds python3 support to them by the way.

Change-Id: Ie7bddcf253eb245844d9e11c17acc69943c1ba63
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
7 years agoMerge "Fix an unorderable types error (if python 3)"
Jose Lausuch [Wed, 17 May 2017 08:59:11 +0000 (08:59 +0000)]
Merge "Fix an unorderable types error (if python 3)"

7 years agoMerge "Add Python3 support to the ODL testcase"
Jose Lausuch [Wed, 17 May 2017 08:59:01 +0000 (08:59 +0000)]
Merge "Add Python3 support to the ODL testcase"

7 years agoMerge "Converted vPing to leverage the object-oriented SNAPS library."
Jose Lausuch [Wed, 17 May 2017 08:56:08 +0000 (08:56 +0000)]
Merge "Converted vPing to leverage the object-oriented SNAPS library."

7 years agoFix an unorderable types error (if python 3) 75/34875/1
Cédric Ollivier [Wed, 17 May 2017 05:34:02 +0000 (07:34 +0200)]
Fix an unorderable types error (if python 3)

Change-Id: I07c5a548f10a1779faead4d9c596a1976aff8866
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
7 years agoAdd Python3 support to the ODL testcase 73/34873/2
Cédric Ollivier [Wed, 17 May 2017 04:06:51 +0000 (06:06 +0200)]
Add Python3 support to the ODL testcase

It also adds this support to its dependencies.

Change-Id: I0534f0c7b0e15a9ee89f522f314cf5200874454c
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
7 years agoUpdate/Add requirements to run ODL robot CSIT 69/34569/3
Jamo Luhrsen [Wed, 10 May 2017 17:27:14 +0000 (10:27 -0700)]
Update/Add requirements to run ODL robot CSIT

It conforms test_odl.py with the new RobotFramework API too.
It also updates test-requirements.txt as required by the current
implementation of run_unit_tests.sh.

Co-Authored-By: Cédric Ollivier <cedric.ollivier@orange.com>
Change-Id: Ibca0150a40d3b8a3f736be1e9dcbf9ce56af0299
Signed-off-by: Jamo Luhrsen <jluhrsen@redhat.com>
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
7 years agoConverted vPing to leverage the object-oriented SNAPS library. 57/25357/33
spisarski [Thu, 1 Dec 2016 19:10:48 +0000 (12:10 -0700)]
Converted vPing to leverage the object-oriented SNAPS library.

JIRA: FUNCTEST-577

1. Replaced procedural openstack_utils with the object-oriented SNAPS
   library
2. Tests now clean themselves up.
3. Improved code documentation.
4. Removed dependency on file-based Cirros image and now leveraging the
   download URL.
5. Removed hardcoded location to the testcases.yaml file to leverage
   the value in config_functest.yaml
6. Included optional flavor metadata based on the scenario being tested
7. Included support for multi-part images.
8. Added enhanced support for configurable images. see SNAPS-76

Fixed line length verification problem with the previous submission
Fixed retrieval of external network name to be dynamic.
Changed external network name retrieval to leverage the newly merged
snap_util.get_ext_net_name() function
Added the creation and deletion of flavors.
SNAPS now has the ability to add/remove security groups from running instances.
Changed VMInstance constructor by moving userdata to configuration object.

Change-Id: I0ef5e268eb153d696bb4d9a7533f780e5c603d26
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
7 years agoDefine Runner class 49/34849/3
Cédric Ollivier [Mon, 15 May 2017 16:55:26 +0000 (18:55 +0200)]
Define Runner class

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>
7 years agoMerge "Fix one minor typo"
Jose Lausuch [Tue, 16 May 2017 16:05:16 +0000 (16:05 +0000)]
Merge "Fix one minor typo"

7 years agoMerge "Fully cover the decorator"
Jose Lausuch [Tue, 16 May 2017 16:03:12 +0000 (16:03 +0000)]
Merge "Fully cover the decorator"

7 years agoMerge "Assign the wrapped function’s attributes"
Jose Lausuch [Tue, 16 May 2017 16:03:10 +0000 (16:03 +0000)]
Merge "Assign the wrapped function’s attributes"

7 years agoMerge "Additional Unit Tests for core modules"
Jose Lausuch [Tue, 16 May 2017 15:23:41 +0000 (15:23 +0000)]
Merge "Additional Unit Tests for core modules"

7 years agoMerge "Get a logger before printing"
Jose Lausuch [Tue, 16 May 2017 15:23:27 +0000 (15:23 +0000)]
Merge "Get a logger before printing"

7 years agoAdd enabled flag in testcases.yaml 33/34833/9
jose.lausuch [Tue, 16 May 2017 09:28:14 +0000 (11:28 +0200)]
Add enabled flag in testcases.yaml

This will allow enable/disable test cases directly
using true/false.

Change-Id: Iaa7d051ebb8dd9e5a6f835a823f58f1e17a87b8d
Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
7 years agoSwitch from generate_report to PrettyTable 21/34621/8
Cédric Ollivier [Thu, 11 May 2017 11:01:16 +0000 (13:01 +0200)]
Switch from generate_report to PrettyTable

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>
7 years agoUpdate framework pres 71/34471/5
Cédric Ollivier [Sat, 6 May 2017 17:54:38 +0000 (19:54 +0200)]
Update framework pres

It takes into account the next framework modifications:
  - Switch TestCase attribute criteria to result [1]
  - Manage criteria in TestCase [2]
  - Print the real testcase duration [3]
  - Rename TestCase check_result() to is_successful() [4]

[1] https://gerrit.opnfv.org/gerrit/#/c/33695/
[2] https://gerrit.opnfv.org/gerrit/#/c/33697/
[3] https://gerrit.opnfv.org/gerrit/#/c/34369/
[4] https://gerrit.opnfv.org/gerrit/#/c/34373/

Change-Id: I3a6790e4233ef4c55b0535618dacf702f779f28b
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
7 years agoFix how to get tier_name 41/34541/7
Cédric Ollivier [Wed, 10 May 2017 09:38:32 +0000 (11:38 +0200)]
Fix how to get tier_name

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>
7 years agoMerge "Modify TestCase.__str__() to use PrettyTable"
Jose Lausuch [Tue, 16 May 2017 11:47:14 +0000 (11:47 +0000)]
Merge "Modify TestCase.__str__() to use PrettyTable"

7 years agoFix one minor typo 75/34775/1
Cédric Ollivier [Mon, 15 May 2017 14:09:01 +0000 (16:09 +0200)]
Fix one minor typo

Change-Id: Id17070985adfbe7817f3be25b47f583cb9ef90b6
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
7 years agoAdditional Unit Tests for core modules 45/28545/14
ashishk1994 [Mon, 13 Feb 2017 17:55:58 +0000 (23:25 +0530)]
Additional Unit Tests for core modules

This patch adds unit tests for vnf and pytest_suite_runner.
It also fixes several pylint warnings/errors.

Additional tests are required to check args values.

Co-Authored-By: Cédric Ollivier <cedric.ollivier@orange.com>
Change-Id: I75a829233481655c794402830e1da037ab7cdb8d
Signed-off-by: ashishk1994 <ashishk.iiit@gmail.com>
7 years agoGet a logger before printing 71/34771/1
Cédric Ollivier [Mon, 15 May 2017 13:47:33 +0000 (15:47 +0200)]
Get a logger before printing

It also fixes pylint errors.

Change-Id: I0d973360574a517724d0be3986c788c3ce7f54d4
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
7 years agoFully cover the decorator 69/34769/1
Cédric Ollivier [Mon, 15 May 2017 12:55:12 +0000 (14:55 +0200)]
Fully cover the decorator

Change-Id: I1f1c938f0715e6afb7edbb8242f9a6c9cbfa65b5
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
7 years agoAssign the wrapped function’s attributes 47/34747/1
Cédric Ollivier [Sun, 14 May 2017 06:50:32 +0000 (08:50 +0200)]
Assign the wrapped function’s attributes

It mainly assigns to the wrapper push_results_to_db's __name__,
__module__ and __doc__ and the documentation string.

Change-Id: Idc882ac4e743699a4887e46c5066e0983c90afd9
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
7 years agoUpgrade robotframework-sshlibrary to 2.1.3 31/31931/2
George Paraskevopoulos [Mon, 27 Mar 2017 16:43:52 +0000 (19:43 +0300)]
Upgrade robotframework-sshlibrary to 2.1.3

Robotframework sshlibrary monkeypatches paramiko runtime and version
2.1.1 causes
2017-03-27 15:24:23,196 - SSH utils - ERROR - _custom_start_client() got
an unexpected keyword argument 'timeout'

errors in SFC test because of the issue
https://github.com/robotframework/SSHLibrary/issues/158

This issue is resolved in version 2.1.3

Change-Id: I07f570c1a90f358b9f17aa6c959642d67e07a7e4
Signed-off-by: George Paraskevopoulos <geopar@intracom-telecom.com>
7 years agoMerge "Add Energy recording support"
Morgan Richomme [Fri, 12 May 2017 06:33:24 +0000 (06:33 +0000)]
Merge "Add Energy recording support"

7 years agoModify TestCase.__str__() to use PrettyTable 87/34587/3
Cédric Ollivier [Thu, 11 May 2017 08:03:47 +0000 (10:03 +0200)]
Modify TestCase.__str__() to use PrettyTable

It adds PrettyTable as requirement even if it's already defined in
OpenStack client dependencies.

If the TestCase object is considered as invalid, it simply returns the
default str.

Change-Id: Iee788aef2a13694d9482560977cbbf21c7f2c967
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
7 years agoMerge "Conform ODL with last framework updates"
Morgan Richomme [Wed, 10 May 2017 07:54:08 +0000 (07:54 +0000)]
Merge "Conform ODL with last framework updates"