aboutsummaryrefslogtreecommitdiffstats
path: root/functest/tests/unit
AgeCommit message (Collapse)AuthorFilesLines
2017-03-10Merge "Add extra check to avoid double delete of instances"Morgan Richomme1-1/+56
2017-03-10Merge "Unit tests added for openstack/tempest"Morgan Richomme3-0/+371
2017-03-09Introduce smoke tests for FDSTomas Cechvala1-9/+17
Added: - fds repository to docker file - fds test to smoke tier in testcases - config values for fds tests A new robot var OS_AUTH_URL is defined as expected by FDS robot files. Method args switch from Keystone IP to OS_AUTH_URL which is more precised. The argument parsing is changed too. Co-Authored-By: Cédric Ollivier <cedric.ollivier@orange.com> Change-Id: Ife27ab4a83f0110cbdcf7c9d47d9b3fb4c0ec705 Signed-off-by: Tomas Cechvala <tcechval@cisco.com> Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-03-08Bugfix: modify test_prepare_env to make verify job successfulLinda Wang1-3/+5
Functest verify job failed due to that test_prepare_env.py mistook one function of ft_utils.execute_command_raise. Change-Id: Ib3b8ca807308bf5c6d250e7debb4c9e1e106e3d1 Signed-off-by: Linda Wang <wangwulin@huawei.com>
2017-03-06Merge "Added Unit Tests for ci/prepare_env"Morgan Richomme2-0/+345
2017-03-03Add extra check to avoid double delete of instancesCiprian Barbu1-1/+56
JIRA: FUNCTEST-748 Sometimes Openstack doesn't handle deletion in a timely manner which can lead to openstack_clean to think there are leftovers from a previous test when in fact the instances are pending deletion. This patch tries to better handle this kind of situation that would otherwise result in a double free and eventually <class 'nova.exception.InstanceInvalidState'> (HTTP 500) Change-Id: Id0d9b61d8380e9b12fc7acd46cd84260714f4baf Signed-off-by: Ciprian Barbu <ciprian.barbu@enea.com>
2017-03-01Unit tests added for openstack/tempestashishk19943-0/+371
_parse_verification_id method is removed as it is not used anywhere Change-Id: Ia2bc75ffbc2527b04cbe2428e2a3822803bde215 Signed-off-by: ashishk1994 <ashishk.iiit@gmail.com>
2017-03-01Added Unit Tests for ci/prepare_envashishk19942-0/+345
JIRA: FUNCTEST-663 Change-Id: Ie240b5f24d11e3a6079cafd260d9d48ed36d3d0a Signed-off-by: ashishk1994 <ashishk.iiit@gmail.com>
2017-02-28[odl-sfc] Add function to retrieve a resource from HEATJuan Vidal1-1/+57
Introduces function to retrieve a HEAT client. For the moment, the only wrapper function is the one to retrieve resources. Added unit tests to cover the new functions. python-heatclient is added to requirements.txt and test_requirements.txt. Change-Id: I547138141c6aad611f2353599fb70a013c83058a Signed-off-by: Juan Vidal <juan.vidal.allende@ericsson.com>
2017-02-22Unit tests for vnf/ims.ashishk19945-0/+718
Change-Id: I12b17ee7ed03987473825e0705074f0430b820bb Signed-off-by: ashishk1994 <ashishk.iiit@gmail.com>
2017-02-14Merge "Limit the substitution of ' in env vars"Cedric Ollivier1-0/+3
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-14Limit the substitution of ' in env varsCédric Ollivier1-0/+3
Only ' located and the beginning or at the end of the string are removed. It completes the first proposal [1]. [1] https://gerrit.opnfv.org/gerrit/#/c/28563/ Change-Id: Ic21cea4c6e98d92983f385c875c3e214411b5f2d Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
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-02-09Fix source_credentials in openstack_utilsCédric Ollivier1-11/+25
It fixes issues raised when an env var contains '=' (e.g. LS_COLORS). It now exports the vars listed in rc_file without creating a new process. Change-Id: I6e6a4e3ab9c45afe4d40015831acb283acbe564c Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-02-06Merge "Change log level when pod, scenario or build_tag cannot be retrieved"Morgan Richomme1-16/+18
2017-02-06Merge "Add netvirt to odl tests"Jose Lausuch1-0/+14
2017-02-06Change log level when pod, scenario or build_tag cannot be retrievedMorgan Richomme1-16/+18
when using Functest out of CI, such env variables may not be set This shall not result in Error messages JIRA: FUNCTEST-716 Change-Id: I86d2023145480dfa9c8d593ea274acbd9e431ef7 Signed-off-by: Morgan Richomme <morgan.richomme@orange.com>
2017-02-06Merge "Unit tests for openstack/rally."Morgan Richomme4-0/+391
2017-02-03Fix template error logGeorge Paraskevopoulos1-6/+4
JIRA:SFC-70 Printing the VNFD template during VNFD creation was left on error level. Move it on info level and make printing prettier. Fix unit test for create_vnfd Change-Id: Ib04a43d72abcf9b6fbcaec9ea05d57b9f017b53f Signed-off-by: George Paraskevopoulos <geopar@intracom-telecom.com>
2017-02-03Add netvirt to odl testsNikolas Hermanns1-0/+14
For the odl test the default odl port is 8080. In netvirt this is the same as apex. Change-Id: I949510e4f7fb57bcf8ec01f69f7941c5d55c98e7 Signed-off-by: Nikolas Hermanns <nikolas.hermanns@ericsson.com>
2017-02-02Merge changes from topic 'convert_unix_format'Jose Lausuch1-26/+26
* changes: Change permissions of python files Convert files to Unix format
2017-02-03Unit tests for openstack/rally.ashishk19944-0/+391
Few bug fix in rally code along with unit tests. Change-Id: Id39a5089ca6fce8aac5ba89eb61d31b02a5e9a98 Signed-off-by: ashishk1994 <ashishk.iiit@gmail.com>
2017-02-02Allow multiple sets of suites in ODLCédric Ollivier1-0/+30
ODLTests can manage multiple sets of suites passing as run args. It avoids duplicating odl.py according to ODL features installed (e.g. netvirt). Change-Id: Ibb0697ef9441506c3f33627e13a0845cc482e23f Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-02-02Convert files to Unix formatCédric Ollivier1-26/+26
Change-Id: I8faa0c9f4185e2d71b9c5d22a6a25830aacd8114 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-01-19Leverage logging config and refactor the loggerhelenyao5-5/+27
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-19Merge "Use 8081 for apex's restconfport robot variable"Morgan Richomme1-3/+5
2017-01-18Use 8081 for apex's restconfport robot variableJamo Luhrsen1-3/+5
Change-Id: Ie3579254b8f09eda3707fbc4b8d098a292f52a93 Signed-off-by: Jamo Luhrsen <jluhrsen@redhat.com>
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-13Fixes ODL rest port for ApexTim Rozet1-1/+1
Apex has enabled tripleo firewall in deployments which block access to port 8181. Only port 8081 is exposed on the admin network now. Change-Id: I58e5eaf16cfc0738c248e1468b2d59cc9f542ddd Signed-off-by: Tim Rozet <trozet@redhat.com>
2017-01-12Merge "Added unit tests for utils/openstack_utils.py"Jose Lausuch1-0/+1688
2017-01-12Merge "Tests added for utils."Morgan Richomme3-0/+1361
2017-01-09Added unit tests for utils/openstack_utils.pyashishk19941-0/+1688
JIRA: FUNCTEST-683 Change-Id: I0e4b27d3fab093d5f3a086df739c1fb6bc6a0939 Signed-off-by: ashishk1994 <ashishk.iiit@gmail.com>
2017-01-09Tests added for utils.ashishk19943-0/+1361
Tests added for: utils/openstack_clean utils/openstack_snapshot utils/openstack_tacker JIRA: FUNCTEST-683 Change-Id: I2d510e70fae73daf35c24b2935ab99bbb241f1f5 Signed-off-by: ashishk1994 <ashishk.iiit@gmail.com>
2017-01-05Cover ODLTests.parse_results()Cédric Ollivier1-1/+23
The ODL testcase is now fully covered by unit tests. Change-Id: I856a40138739b148babcfa96e82da05bb83e63e1 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-01-05Switch to assert_any_call in test_show_credentialsCédric Ollivier1-1/+1
The previous test can be false if users set OS_ env vars. Change-Id: If517582d77aa1373bf253d7e23731e2e896d26ac Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-01-04Create ODLParser to parse sys.argvCédric Ollivier1-0/+82
It helps covering lines about args parsing without calling main. It also excludes 'if __name__ == .__main__.:' from coverage. The related unit tests are added too. Change-Id: I8e001a9d35081000977e0e546ae505f7cf2870e6 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-01-04Fully cover set_robotframework_varsCédric Ollivier1-1/+32
re.sub() is now tested. Change-Id: I83cf69b66cd1407f5e4439d8c545338c5fb0bde7 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-01-04Use mock_open() to prevent stdout.txtCédric Ollivier1-0/+12
/home/opnfv is no longer required. Change-Id: Iefb8faf3a7d548f3ae7d4076005d7b0bb93e63e1 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-01-04Patch logging.FileHandlerCédric Ollivier4-0/+4
It avoids creating a dummy functest.log for unit testing. Change-Id: Ib163d5d58284822b1904444fb60b08e92ee0ab9b Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-01-04Merge "Added unit tests for utils/functest_utils.py."Morgan Richomme2-45/+599
2017-01-04Added Unit Tests for cli.ashishk19947-0/+739
JIRA: FUNCTEST-590 Change-Id: I5e28145cae742598927e8edbe65091fedb533a4d Signed-off-by: ashishk1994 <ashishk.iiit@gmail.com>
2017-01-02Added unit tests for utils/functest_utils.py.ashishk19942-45/+599
JIRA: FUNCTEST-683 Change-Id: I181d98847b2ca94ce84a670239b8a958bfae44cd Signed-off-by: ashishk1994 <ashishk.iiit@gmail.com>
2017-01-02Unit tests utils added.ashishk19941-0/+23
Change-Id: I8e6115c8869032ad6d22dc62febb9c8003bfa422 Signed-off-by: ashishk1994 <ashishk.iiit@gmail.com>
2016-12-17Cover ODLResultVisitorCédric Ollivier1-0/+35
It adds unit tests to cover ODLResultVisitor and then increases the coverage to 78%. It also fixes a nit in details pushed to DB. Change-Id: Ie4c31df67b5197c4273ee835242153e74b50601d Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2016-12-16Avoid side effects induced by functest_constants in ODL UTCédric Ollivier2-49/+43
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>