Fixing some errors in onboarding test modules.
Change-Id: I1af353693db1c82020efd7055c4893ebd6dd00a1
diff --git a/src/test/onboarding/onboardingTest.py b/src/test/onboarding/onboardingTest.py
index 1768888..17c0b6f 100644
--- a/src/test/onboarding/onboardingTest.py
+++ b/src/test/onboarding/onboardingTest.py
@@ -99,7 +99,7 @@
assert_equal(len(status), 0)
def test_exampleservice_for_default_route_through_testclient(self):
- if self.on_pod is False:
+ if self.on_pod is False:
return
ssh_agent = SSHTestAgent(host = self.HEAD_NODE, user = self.USER, password = self.PASS)
cmd = "sudo lxc exec testclient -- route | grep default"
@@ -123,5 +123,5 @@
def test_exampleservice_for_service_message(self):
pass
- def test_exampleservice_using__curl(self):
+ def test_exampleservice_using_curl(self):
pass
diff --git a/src/test/vsg/vsgTest.py b/src/test/vsg/vsgTest.py
index b8476ae..73812e5 100644
--- a/src/test/vsg/vsgTest.py
+++ b/src/test/vsg/vsgTest.py
@@ -360,41 +360,6 @@
os.system('dhclient '+vcpe+' -r')
return True
- def test_vsg_multiple_subscribers_for_same_vcpe_instace(self):
- vcpe_intfs,containers = self.get_vcpe_containers_and_interfaces()
- for vcpe in vcpe_intfs:
- vcpe_ip = self.get_vcpe_interface_dhcp_ip(vcpe=vcpe)
- assert_not_equal(vcpe_ip,None)
- for vcpe in vcpe_intfs:
- self.release_vcpe_interface_dhcp_ip(vcpe=vcpe)
-
- def test_vsg_multiple_subscribers_for_same_vcpe_instance_ping_to_external_connectivity(self):
- host = '8.8.8.8'
- vcpe_intfs, containers = self.get_vcpe_containers_and_interfaces()
- for vcpe in vcpe_intfs:
- vcpe_ip = self.get_vcpe_interface_dhcp_ip(vcpe=vcpe)
- assert_not_equal(vcpe_ip,None)
- self.add_static_route_via_vcpe_interface([host],vcpe=vcpe,dhcp_ip=False)
- st, _ = getstatusoutput('ping -I {} -c 3 {}'.format(vcpe,host))
- assert_equal(st, 0)
- self.del_static_route_via_vcpe_interface([host],vcpe=vcpe,dhcp_release=False)
- for vcpe in vcpe_intfs:
- self.release_vcpe_interface_dhcp_ip(vcpe=vcpe)
-
- def test_vsg_vcpe_interface_gets_dhcp_ip_after_interface_toggle(self):
- vcpe_intfs,containers = self.get_vcpe_containers_and_interfaces()
- for vcpe in vcpe_intfs:
- vcpe_ip = self.get_vcpe_interface_dhcp_ip(vcpe=vcpe)
- assert_not_equal(vcpe_ip,None)
- os.system('ifconfig {} down'.format(vcpe))
- time.sleep(1)
- os.system('ifconfig {} up'.format(vcpe))
- time.sleep(1)
- vcpe_ip2 = get_ip(vcpe)
- assert_equal(vcpe_ip2,vcpe_ip)
- for vcpe in vcpe_intfs:
- self.release_vcpe_interface_dhcp_ip(vcpe=vcpe)
-
def test_vsg_health(self):
"""
Algo:
@@ -1724,7 +1689,6 @@
reactor.callLater(0, vcpe_firewall, df)
return df
-
#this test case needs modification.default route should be vcpe interface to run this test case
@deferred(TIMEOUT)
def test_vsg_firewall_deny_all_dns_traffic(self,vcpe_name=None,vcpe_intf=None):
@@ -2039,6 +2003,41 @@
if subId and subId != '0':
self.vsg_xos_subscriber_delete(4, subId)
+ def test_vsg_multiple_subscribers_for_same_vcpe_instace(self):
+ vcpe_intfs,containers = self.get_vcpe_containers_and_interfaces()
+ for vcpe in vcpe_intfs:
+ vcpe_ip = self.get_vcpe_interface_dhcp_ip(vcpe=vcpe)
+ assert_not_equal(vcpe_ip,None)
+ for vcpe in vcpe_intfs:
+ self.release_vcpe_interface_dhcp_ip(vcpe=vcpe)
+
+ def test_vsg_multiple_subscribers_for_same_vcpe_instance_ping_to_external_connectivity(self):
+ host = '8.8.8.8'
+ vcpe_intfs, containers = self.get_vcpe_containers_and_interfaces()
+ for vcpe in vcpe_intfs:
+ vcpe_ip = self.get_vcpe_interface_dhcp_ip(vcpe=vcpe)
+ assert_not_equal(vcpe_ip,None)
+ self.add_static_route_via_vcpe_interface([host],vcpe=vcpe,dhcp_ip=False)
+ st, _ = getstatusoutput('ping -I {} -c 3 {}'.format(vcpe,host))
+ assert_equal(st, 0)
+ self.del_static_route_via_vcpe_interface([host],vcpe=vcpe,dhcp_release=False)
+ for vcpe in vcpe_intfs:
+ self.release_vcpe_interface_dhcp_ip(vcpe=vcpe)
+
+ def test_vsg_vcpe_interface_gets_dhcp_ip_after_interface_toggle(self):
+ vcpe_intfs,containers = self.get_vcpe_containers_and_interfaces()
+ for vcpe in vcpe_intfs:
+ vcpe_ip = self.get_vcpe_interface_dhcp_ip(vcpe=vcpe)
+ assert_not_equal(vcpe_ip,None)
+ os.system('ifconfig {} down'.format(vcpe))
+ time.sleep(1)
+ os.system('ifconfig {} up'.format(vcpe))
+ time.sleep(1)
+ vcpe_ip2 = get_ip(vcpe)
+ assert_equal(vcpe_ip2,vcpe_ip)
+ for vcpe in vcpe_intfs:
+ self.release_vcpe_interface_dhcp_ip(vcpe=vcpe)
+
def test_vsg_for_dns_service(self):
"""
Algo: