aboutsummaryrefslogtreecommitdiffstats
path: root/sfc/unit_tests
AgeCommit message (Collapse)AuthorFilesLines
2019-01-25Fix Two Chains Test and Enabled all Testcasesgvrangan3-5/+117
- Method added to support Port Chain update - Used the new method to modify the test as follows - Create two Port Chains (one VNF per chain) - Block ssh in one vnf and http in the other - Test communication - Swap the flow classifiers in the chains so that ssh packets are sent to vnf where http is blocked and vice versa - Fix extracting odl username/password from ml2_conf - Checking flow classifiers are implemented - Fixed odl cleanup Change-Id: I1f0f3a3b829d6c73d1bb1a774ebf3484912b84b7 Signed-off-by: gvrangan <venkatrangang@hcl.com>
2019-01-21Simplify deletion test and fix unittestManuel Buil1-0/+35
Removing the port groups when deleting the first chain simplifies things because we don't need port_groups to be a variable of the SfcCommonTestCase class There were also some missing unittest Change-Id: I6ae780bdc72116907a9e6037571c29f28a6ba334 Signed-off-by: Manuel Buil <mbuil@suse.com>
2018-11-26Migrate SNAPS to Openstack-SDKNikos Mimigiannis2-400/+677
JIRA: SFC-137 This patch replaces SNAPS library with openstack_SDK library for TCs with mano component: no-mano Change-Id: I99b9a5f54a273f61ecff05a11616440d5e85e55b Signed-off-by: Nikos Mimigiannis <nmimi@intracom-telecom.com>
2018-11-06Avoid race conditionsManuel Buil1-0/+34
Sometimes the port pair group gets created before port pair was committed in openstack. Before creating the port pair group, we check that the port pair is already listed by openstack Change-Id: Icfd23521859fc5d4e6bb6745be80f79bf9e31a0c Signed-off-by: Manuel Buil <mbuil@suse.com>
2018-10-30Improve ansible tasks and fix license headersVenkata Harshavardhan Reddy Allu3-6/+6
This patch does two things: 1. improve the ansible tasks: - register Openstack as VIM - create osmrc file - install OSM (master) 2. fix license headers in unit tests installer-type:osa deploy-scenario:os-odl-sfc_osm Change-Id: I02297dae2b0108397541cedeb2f47183f1df99fc Signed-off-by: Venkata Harshavardhan Reddy Allu <venkataharshavardhan_ven@srmuniv.edu.in>
2018-10-26Add a bit more data to the logging messageManuel Buil1-6/+6
In case of failures, it is hard to understand for what vnf the port pair was being created when things went wrong Change-Id: I1cfa2553318d910535d45910b2a46d75b2f7926a Signed-off-by: Manuel Buil <mbuil@suse.com>
2018-09-18Refactor unit tests in 'test_openstack_utils.py'Venkata Harshavardhan Reddy Allu1-119/+227
JIRA: SFC-126 JIRA: SFC-129 Some of the unit tests I wrote earlier needs to be separated into individual unit tests, which Mr Dimitrios has mentioned in one of my previous commits. Unit tests are supposed to be independent & should only test one test case at a time. This patch fixes them. Change-Id: Ie4651c0eeede5fe729356664493708d8144ff84a Signed-off-by: Venkata Harshavardhan Reddy Allu <venkataharshavardhan_ven@srmuniv.edu.in>
2018-09-17Refactor unit tests in 'test_test_utils.py'Venkata Harshavardhan Reddy Allu1-26/+41
JIRA: SFC-126 JIRA: SFC-129 Some of the unit tests I wrote earlier needs to be separated into individual unit tests, which Mr Dimitrios has mentioned in one of my previous commits. Unit tests are supposed to be independent & should only test one test case at a time. This patch fixes them. Change-Id: I1ccecf049645fe4996d8b4fa5425d485727e1ae0 Signed-off-by: Venkata Harshavardhan Reddy Allu <venkataharshavardhan_ven@srmuniv.edu.in>
2018-09-11Refactor unit tests in 'test_odl_utils.py'Venkata Harshavardhan Reddy Allu1-57/+115
JIRA: SFC-126 JIRA: SFC-129 Some of the unit tests I wrote earlier needs to be separated into individual unit tests, which Mr Dimitrios has mentioned in one of my previous commits. Unit tests are supposed to be independent & should only test one test case at a time. This patch fixes them. Change-Id: Iaf20e5868491f0627882929a953f3c4a3273f626 Signed-off-by: Venkata Harshavardhan Reddy Allu <venkataharshavardhan_ven@srmuniv.edu.in>
2018-09-03Remove port security from vnfs when no-manoManuel Buil1-2/+62
If the ports have security enabled, the traffic is dropped due to the anti-spoofing Change-Id: I6fbc63a3d959d9d55dfd1d64e12e1d0e7ec48bcb Signed-off-by: Manuel Buil <mbuil@suse.com>
2018-08-31Decouple tacker from testsManuel Buil3-84/+304
Support n-sfc too and abstract a bit the MANO layer so that other MANO components can be inserted into the test Change-Id: I3fb59fbf40b4207bf1721092cd8ff0559e1d9d90 Signed-off-by: Manuel Buil <mbuil@suse.com>
2018-08-29Change the test result comparison in 'test_odl_utils.py' #L103Venkata Harshavardhan Reddy Allu1-1/+1
When 'get_active_rsps_on_ports' is executed, it returns a list of unordered dictionaries, sorting the result to verify the return value would fix the test assertion. Change-Id: Id39dc8d15f9efb0ef76168f823d7d52333474e16 Signed-off-by: Venkata Harshavardhan Reddy Allu <venkataharshavardhan_ven@srmuniv.edu.in>
2018-08-22Added unit tests for 'odl_utils.py' moduleVenkata Harshavardhan Reddy Allu1-0/+775
JIRA: SFC-123 Change-Id: I49b8dae157816ef04a45dea188cc7dbe3aa72d4a Signed-off-by: Venkata Harshavardhan Reddy Allu <venkataharshavardhan_ven@srmuniv.edu.in>
2018-08-13Added unit tests for 'openstack_utils.py' moduleVenkata Harshavardhan Reddy Allu1-0/+1715
JIRA: SFC-123 Change-Id: Ia41ec596d1c2247b2c86d88672a07e50021b3bc0 Signed-off-by: Venkata Harshavardhan Reddy Allu <venkataharshavardhan_ven@srmuniv.edu.in>
2018-06-27Added unit tests for 'test_utils.py' moduleVenkata Harshavardhan Reddy Allu1-0/+528
Jira: SFC-123 Change-Id: Ib8e3e748f3992d9030db1308a728a2576e7957ed Signed-off-by: Venkata Harshavardhan Reddy Allu <venkataharshavardhan_ven@srmuniv.edu.in>
2018-06-25Remove side_effect method in 'test_cleanup.py' moduleVenkata Harshavardhan Reddy Allu1-2/+0
The side_effect method under test_delete_openstack_objects_exception method in 'test_cleanup.py' module is not needed. In fact, it won't be called at all. It should have been detected in [pylint] W0612. So when we run the nosetest, side_effect from Mock instances of mock_creator_obj_one and mock_creator_obj_two were called. Change-Id: Ibad6c8ebe14c320ef31c2133635ecd45fd011835 Signed-off-by: Venkata Harshavardhan Reddy Allu <venkataharshavardhan_ven@srmuniv.edu.in>
2018-06-21Create unit tests for 'cleanup.py' moduleDimitrios Markou3-0/+368
This is the first attempt to add unit testing capabilities to OPNFV/SFC project. Also we are following the contraints.txt logic which helps in the direction of simulating a test env which will be as much as close to the real env that the SFC testcases are running. Jira: SFC-127 Jira: SFC-129 Change-Id: I938d28f9f85614cdefa163949c4ec9f06f5d27b4 Signed-off-by: Dimitrios Markou <mardim@intracom-telecom.com>