aboutsummaryrefslogtreecommitdiffstats
path: root/functest/tests
AgeCommit message (Collapse)AuthorFilesLines
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>
2016-12-15Add check_criteria() in testcase_baseCédric Ollivier2-9/+20
It allows checking testcase results and then returning an error value to CI. Now run() should return EX_OK even if criteria is FAILED. It also fixes an issue induced by [1]. [1] https://gerrit.opnfv.org/gerrit/#/c/24561/ Change-Id: Iaa095696f9dcb87f8cc95179b4f404b092d1e23e Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2016-12-14Authenticate clients with keystoneauth1.sessionhelenyao1-28/+15
JIRA: FUNCTEST-529 1. use keystoneauth1.session to initialize the client for each service The keystoneauth1.session.Session class was introduced into keystoneauth1 as an attempt to bring a unified interface to the various OpenStack clients that share common authentication and request parameters between a variety of services. 2. update ODL case to leverage session to get the endpoint info Change-Id: Ic8c01b9b7ed86d3bdd9f5125504bc47f46a37700 Signed-off-by: helenyao <yaohelan@huawei.com>
2016-12-02Rename TestCasesBase into TestcaseBasehelenyao2-32/+32
JIRA: FUNCTEST-628 1. rename the TestCasesBase into TestcaseBase 2. updated the module name to testcase_base.py Change-Id: Ic6b5d8209098c136613a2419c3790668fdbd493e Signed-off-by: helenyao <yaohelan@huawei.com>
2016-11-30Allow unit testing w/o internet connectivityCédric Ollivier1-6/+21
urllib2.urlopen() is now patched when testing the internet connectivity helper. Change-Id: I4ddf1dd8f494fe282735e1051986a0b5dd1a040f Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2016-11-25file/dir renaming for consistencyMorgan Richomme1-8/+8
JIRA: FUNCTEST-579 Change-Id: Iaa545db70bfb76770df0a3d17871e29ce518ff2d Signed-off-by: Morgan Richomme <morgan.richomme@orange.com>
2016-11-25Merge "Consider criteria as exit condition in odl test"Morgan Richomme1-4/+8
2016-11-24Consider criteria as exit condition in odl testMorgan Richomme1-4/+8
JIRA: FUNCTEST-621 Change-Id: Ic9dd73861d84e3dbfb3e6611ffc9e5e2c09fcaed Signed-off-by: Morgan Richomme <morgan.richomme@orange.com>
2016-11-24Extracted all global parameters into functest_constants.pyhelenyao3-24/+37
JIRA: FUNCTEST-533 1. Extracted all global variables into functest_constants.py and updated all affected areas accordingly 2. Used os.path.join to replace '/' to come up with the path for better cross-platform support and improve the path accuracy 3. Removed unused variables 4. Updated the hardcoded path in Dockerfile by using variable reference 5. Removed "/" ending from all path variables 6. Updated the unit test Change-Id: Ib30a81d1f0c83fbaef042d63c187c27bd18301bb Signed-off-by: helenyao <yaohelan@huawei.com>
2016-11-09Repo structure modificationMorgan Richomme8-0/+446
- create functest subdirectory - rename unit tests - adapt path in exec and config files JIRA: FUNCTEST-525 Change-Id: Ifd5c6edfb5bda1b09f82848e2269ad5fbeb84d0a Signed-off-by: Morgan Richomme <morgan.richomme@orange.com>