summaryrefslogtreecommitdiffstats
path: root/test/functest/testcase_2.py
AgeCommit message (Collapse)AuthorFilesLines
2016-11-18Refactor config global variablesGeorge Paraskevopoulos1-166/+117
- Create config.py module to handle configuration parsing - Remove globals from testcases Change-Id: I16ed7bb138fde2d5d3c69703e3c2e569d49f0b37 Signed-off-by: George Paraskevopoulos <geopar@intracom-telecom.com>
2016-11-10Encapsulate sleeps in functionGeorge Paraskevopoulos1-3/+2
We have some sleeps into the testcase code. We can encapsulate them in a utility function to refactor them out of the code until we figure out the best way to remove them completely Change-Id: I44c32d8329c2e319660518a8a46debc22f02c753 Signed-off-by: George Paraskevopoulos <geopar@intracom-telecom.com>
2016-11-07Refactor common code across testsRomanos Skiadas1-24/+2
- Move collecting test results in a method in Results class - Create a util function for asserting the environment has enough compute nodes Change-Id: Ib7b9dfab7d2e9f50d5f352d3eadba4d4717ee750 Signed-off-by: Romanos Skiadas <rski@intracom-telecom.com>
2016-09-15RefactoringRomanos Skiadas1-144/+45
- Wrap common methods that use globals in a Class `get_ping_status` and `add_to_summary` depended on globals for statefulness. The easiest way to refactor them was to convert them into methods and the globals they used into instance variables. - Move `generate_userdata_common` and `generate_userdata_with_ssh` to the utils module. - Make flavor a kwarg in create_instance. Add a defaults section in config.yaml with flavor. This value is used if flavor is not passed via kwargs. - Substitute some sleeps with `wait_for_instances_up` which will wait until a dhcp lease success message appears in the instance's log. - Add functions that wait until router and network association is completed. These do not replace the sleeps but make the tests more deterministic. - Remove unused ping_timeout from config.yaml Change-Id: Ia68ebf47aaa5a58c4e20267f1476db626f015a7c Signed-off-by: Romanos Skiadas <rski@intracom-telecom.com> Co-Authored-by: George Paraskevopoulos <geopar@intracom-telecom.com>
2016-09-09Use get_functest_config where appropriateRomanos Skiadas1-4/+4
The latest functest enforces using `get_parameter_from_yaml` to only get test specific parameters from the config file. `get_functest_config` is given to get functest configuration parameters. Change-Id: Icb6ec2ed4a9d6c278bf1c403d4d0c4f4b21e51b7 Signed-off-by: Romanos Skiadas <rski@intracom-telecom.com>
2016-09-09Refactor some common methods into utilsRomanos Skiadas1-125/+66
- generete_ping_userdata(): This method was exactly the same in two tests - create_instance(): The various implementations of this method had almost the same signature, but not quite. This was fixed by adding extra arguments as needed. Also a global variable was used in the function, which was converted into a parameter. - create_network(): The three implementations of create_network had three different signatures and returned different variables. They were all unified in a single create_network class and the calls to create_network were adjusted accordingly. Revision 1: Fix flake8 violations Revision 2: Rename logger in utils Change-Id: Ib6cfe798dc561a69eb50c901e3aa71c19d465821 Signed-off-by: Romanos Skiadas <rski@intracom-telecom.com>
2016-07-23Remove logger from openstack_utils function callsjose.lausuch1-5/+3
Change-Id: Iebaa6f15b16f91e451662e13e0542f863f93da52 Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
2016-07-20Report overall status of the test results to DBjose.lausuch1-1/+1
The reporting Dashboard looks for the test case called 'bgpvpn'. Now, we report the overall status of the tests into that test case and also each one separatelly. http://testresults.opnfv.org/test/api/v1/results?case=bgpvpn Also, fix the 3 flake8 violations Change-Id: I5b0d816894bf16d3d11085437f1556b5d0446d81 Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
2016-07-14Add support to push the results to the DBjose.lausuch1-17/+33
JIRA: SDNVPN-19 The test scripts now return a json object with the following format: {"status": criteria, "details": results} where criteria: "PASS"|"FAILED" (result of the test case) details: free output that will be printed to the console and pushed to the DB Change-Id: I9e5e0c3b6cb5f4b060929b71a06f6e4f95f814fb Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
2016-07-13Fix testcase2jose.lausuch1-17/+15
JIRA: SDNVPN-31 It seems due to the merge conflict, some of the lines got reordered and the script failed. Also, added the private key for the instances. Change-Id: I58c3dfe5ba2d43e0749ca5cd08b3a87221a68b66 Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
2016-07-12Adding test case 2Tim Irnich1-2/+460
JIRA: SDNVPN-31 Test case 2 checks tenant IP address space separation. Now done with this change. Change-Id: I07ef04de4195b2892c837ac87e53146d133755c6 Signed-off-by: Tim Irnich <tim.irnich@ericsson.com>
2016-06-28Added directory structure for the tests and script templates.jose.lausuch1-0/+22
JIRA: SDNVPN-19 Change-Id: I358efcb377211182a93b2db43f248ca82c14fb36 Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>