Skip to content

Commit a979ab9

Browse files
ustcweizhouDaanHoogland
authored andcommitted
integration test: update steps
1 parent 6a91b8a commit a979ab9

File tree

4 files changed

+126
-15
lines changed

4 files changed

+126
-15
lines changed

test/integration/component/test_multiple_subnets_in_isolated_network.py

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,21 @@ def test_01_acquire_public_ips_in_isolated_network_with_single_vr(self):
308308
# 17. release new ip 4
309309
# verify the available nics in VR should be "eth0,eth1,eth2,eth3,eth4,"
310310
# verify the IPs in VR. eth0 -> guest nic, eth2 -> source nat IP, eth3 -> new ip 3, eth4 -> new ip 6
311+
# 18. release new ip 3
312+
# verify the available nics in VR should be "eth0,eth1,eth2,eth4,"
313+
# verify the IPs in VR. eth0 -> guest nic, eth2 -> source nat IP, eth4 -> new ip 6
314+
# 19. restart network
315+
# verify the available nics in VR should be "eth0,eth1,eth2,eth4,"
316+
# verify the IPs in VR. eth0 -> guest nic, eth2 -> source nat IP, eth4 -> new ip 6
317+
# 20. reboot router
318+
# verify the available nics in VR should be "eth0,eth1,eth2,eth3,"
319+
# verify the IPs in VR. eth0 -> guest nic, eth2 -> source nat IP, eth3 -> new ip 6
320+
# 21. restart network with cleanup
321+
# verify the available nics in VR should be "eth0,eth1,eth2,eth3,"
322+
# verify the IPs in VR. eth0 -> guest nic, eth2 -> source nat IP, eth3 -> new ip 6
323+
# 22. restart network with cleanup, makeredundant=true
324+
# verify the available nics in VR should be "eth0,eth1,eth2,eth3,"
325+
# verify the IPs in VR. eth0 -> guest nic, eth2 -> source nat IP, eth3 -> new ip 6
311326
"""
312327

313328
# Create new domain1
@@ -719,6 +734,8 @@ def test_01_acquire_public_ips_in_isolated_network_with_single_vr(self):
719734
self.verify_router_publicnic_state(router, host, "eth2|eth4")
720735

721736
# 19. restart network
737+
# verify the available nics in VR should be "eth0,eth1,eth2,eth4,"
738+
# verify the IPs in VR. eth0 -> guest nic, eth2 -> source nat IP, eth4 -> new ip 6
722739
self.network1.restart(self.apiclient)
723740
routers = self.get_routers(self.network1.id)
724741
for router in routers:
@@ -733,7 +750,9 @@ def test_01_acquire_public_ips_in_isolated_network_with_single_vr(self):
733750
self.verify_ip_address_in_router(router, host, ipaddress_6.ipaddress.ipaddress, "eth4", True)
734751
self.verify_router_publicnic_state(router, host, "eth2|eth4")
735752

736-
# reboot router
753+
# 20. reboot router
754+
# verify the available nics in VR should be "eth0,eth1,eth2,eth3,"
755+
# verify the IPs in VR. eth0 -> guest nic, eth2 -> source nat IP, eth3 -> new ip 6
737756
for router in routers:
738757
cmd = rebootRouter.rebootRouterCmd()
739758
cmd.id = router.id
@@ -750,7 +769,9 @@ def test_01_acquire_public_ips_in_isolated_network_with_single_vr(self):
750769
self.verify_ip_address_in_router(router, host, ipaddress_6.ipaddress.ipaddress, "eth3", True)
751770
self.verify_router_publicnic_state(router, host, "eth2|eth3")
752771

753-
# 20. restart network with cleanup
772+
# 21. restart network with cleanup
773+
# verify the available nics in VR should be "eth0,eth1,eth2,eth3,"
774+
# verify the IPs in VR. eth0 -> guest nic, eth2 -> source nat IP, eth3 -> new ip 6
754775
self.network1.restart(self.apiclient, cleanup=True)
755776
routers = self.get_routers(self.network1.id)
756777
for router in routers:
@@ -764,7 +785,9 @@ def test_01_acquire_public_ips_in_isolated_network_with_single_vr(self):
764785
self.verify_ip_address_in_router(router, host, ipaddress_5.ipaddress.ipaddress, "eth3", False)
765786
self.verify_ip_address_in_router(router, host, ipaddress_6.ipaddress.ipaddress, "eth3", True)
766787

767-
# 21. restart network with cleanup, makeredundant=true
788+
# 22. restart network with cleanup, makeredundant=true
789+
# verify the available nics in VR should be "eth0,eth1,eth2,eth3,"
790+
# verify the IPs in VR. eth0 -> guest nic, eth2 -> source nat IP, eth3 -> new ip 6
768791
self.network1.restart(self.apiclient, cleanup=True, makeredundant=True)
769792
routers = self.get_routers(self.network1.id)
770793
for router in routers:

test/integration/component/test_multiple_subnets_in_isolated_network_rvr.py

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,21 @@ def test_02_acquire_public_ips_in_isolated_network_with_redundant_vrs(self):
308308
# 17. release new ip 4
309309
# verify the available nics in VR should be "eth0,eth1,eth2,eth3,eth4,"
310310
# verify the IPs in VR. eth0 -> guest nic, eth2 -> source nat IP, eth3 -> new ip 3, eth4 -> new ip 6
311+
# 18. release new ip 3
312+
# verify the available nics in VR should be "eth0,eth1,eth2,eth4,"
313+
# verify the IPs in VR. eth0 -> guest nic, eth2 -> source nat IP, eth4 -> new ip 6
314+
# 19. restart network
315+
# verify the available nics in VR should be "eth0,eth1,eth2,eth4,"
316+
# verify the IPs in VR. eth0 -> guest nic, eth2 -> source nat IP, eth4 -> new ip 6
317+
# 20. reboot router
318+
# verify the available nics in VR should be "eth0,eth1,eth2,eth3,"
319+
# verify the IPs in VR. eth0 -> guest nic, eth2 -> source nat IP, eth3 -> new ip 6
320+
# 21. restart network with cleanup
321+
# verify the available nics in VR should be "eth0,eth1,eth2,eth3,"
322+
# verify the IPs in VR. eth0 -> guest nic, eth2 -> source nat IP, eth3 -> new ip 6
323+
# 22. restart network with cleanup, makeredundant=true
324+
# verify the available nics in VR should be "eth0,eth1,eth2,eth3,"
325+
# verify the IPs in VR. eth0 -> guest nic, eth2 -> source nat IP, eth3 -> new ip 6
311326
"""
312327

313328
# Create new domain1
@@ -719,6 +734,8 @@ def test_02_acquire_public_ips_in_isolated_network_with_redundant_vrs(self):
719734
self.verify_router_publicnic_state(router, host, "eth2|eth4")
720735

721736
# 19. restart network
737+
# verify the available nics in VR should be "eth0,eth1,eth2,eth4,"
738+
# verify the IPs in VR. eth0 -> guest nic, eth2 -> source nat IP, eth4 -> new ip 6
722739
self.network1.restart(self.apiclient)
723740
routers = self.get_routers(self.network1.id)
724741
for router in routers:
@@ -733,7 +750,9 @@ def test_02_acquire_public_ips_in_isolated_network_with_redundant_vrs(self):
733750
self.verify_ip_address_in_router(router, host, ipaddress_6.ipaddress.ipaddress, "eth4", True)
734751
self.verify_router_publicnic_state(router, host, "eth2|eth4")
735752

736-
# reboot router
753+
# 20. reboot router
754+
# verify the available nics in VR should be "eth0,eth1,eth2,eth3,"
755+
# verify the IPs in VR. eth0 -> guest nic, eth2 -> source nat IP, eth3 -> new ip 6
737756
for router in routers:
738757
cmd = rebootRouter.rebootRouterCmd()
739758
cmd.id = router.id
@@ -750,7 +769,9 @@ def test_02_acquire_public_ips_in_isolated_network_with_redundant_vrs(self):
750769
self.verify_ip_address_in_router(router, host, ipaddress_6.ipaddress.ipaddress, "eth3", True)
751770
self.verify_router_publicnic_state(router, host, "eth2|eth3")
752771

753-
# 20. restart network with cleanup
772+
# 21. restart network with cleanup
773+
# verify the available nics in VR should be "eth0,eth1,eth2,eth3,"
774+
# verify the IPs in VR. eth0 -> guest nic, eth2 -> source nat IP, eth3 -> new ip 6
754775
self.network1.restart(self.apiclient, cleanup=True)
755776
routers = self.get_routers(self.network1.id)
756777
for router in routers:
@@ -764,3 +785,20 @@ def test_02_acquire_public_ips_in_isolated_network_with_redundant_vrs(self):
764785
self.verify_ip_address_in_router(router, host, ipaddress_5.ipaddress.ipaddress, "eth3", False)
765786
self.verify_ip_address_in_router(router, host, ipaddress_6.ipaddress.ipaddress, "eth3", True)
766787
self.verify_router_publicnic_state(router, host, "eth2|eth3")
788+
789+
# 22. restart network with cleanup, makeredundant=true
790+
# verify the available nics in VR should be "eth0,eth1,eth2,eth3,"
791+
# verify the IPs in VR. eth0 -> guest nic, eth2 -> source nat IP, eth3 -> new ip 6
792+
self.network1.restart(self.apiclient, cleanup=True, makeredundant=True)
793+
routers = self.get_routers(self.network1.id)
794+
for router in routers:
795+
host = self.get_router_host(router)
796+
self.verify_network_interfaces_in_router(router, host, "eth0,eth1,eth2,eth3,")
797+
guestIp, controlIp, sourcenatIp = self.get_router_ips(router)
798+
self.verify_ip_address_in_router(router, host, guestIp, "eth0", True)
799+
self.verify_ip_address_in_router(router, host, controlIp, "eth1", True)
800+
self.verify_ip_address_in_router(router, host, sourcenatIp, "eth2", True)
801+
self.verify_ip_address_in_router(router, host, ipaddress_4.ipaddress.ipaddress, "eth3", False)
802+
self.verify_ip_address_in_router(router, host, ipaddress_5.ipaddress.ipaddress, "eth3", False)
803+
self.verify_ip_address_in_router(router, host, ipaddress_6.ipaddress.ipaddress, "eth3", True)
804+
self.verify_router_publicnic_state(router, host, "eth2|eth3")

test/integration/component/test_multiple_subnets_in_vpc.py

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,23 @@ def test_03_acquire_public_ips_in_vpc_with_single_vr(self):
318318
# 18. release new ip 4
319319
# verify the available nics in VR should be "eth0,eth1,eth2,eth3,eth4,eth5,"
320320
# verify the IPs in VR. eth1 -> source nat IP, eth2 -> tier 1, eth3 -> new ip 3, eth4 -> tier 2, eth5 -> new ip 6
321+
# 19. release new ip 3
322+
# verify the available nics in VR should be "eth0,eth1,eth2,eth4,eth5,"
323+
# verify the IPs in VR. eth1 -> source nat IP, eth2 -> tier 1, eth4 -> tier 2, eth5 -> new ip 6
324+
# 20. restart tier1
325+
# 22. restart VPC
326+
# 23. Add private gateway
327+
# verify the available nics in VR should be "eth0,eth1,eth2,eth4,eth5,"
328+
# verify the IPs in VR. eth1 -> source nat IP, eth2 -> tier 1, eth4 -> tier 2, eth5 -> new ip 6, eth3-> private gateway
329+
# 24. reboot router
330+
# verify the available nics in VR should be "eth0,eth1,eth2,eth3,eth4,eth5,"
331+
# verify the IPs in VR. eth1 -> source nat IP, eth2 -> new ip 6, eth3 -> tier 1, eth4 -> private gateway, eth5 -> tier 2
332+
# 25. restart VPC with cleanup
333+
# verify the available nics in VR should be "eth0,eth1,eth2,eth3,eth4,eth5,"
334+
# verify the IPs in VR. eth1 -> source nat IP, eth2 -> new ip 6, eth3 -> tier 1, eth4 -> private gateway, eth5 -> tier 2
335+
# 26. restart VPC with cleanup, makeredundant=true
336+
# verify the available nics in VR should be "eth0,eth1,eth2,eth3,eth4,eth5,"
337+
# verify the IPs in VR. eth1 -> source nat IP, eth2 -> new ip 6, eth3 -> tier 1, eth4 -> private gateway, eth5 -> tier 2
321338
"""
322339

323340
# Create new domain1
@@ -796,7 +813,7 @@ def test_03_acquire_public_ips_in_vpc_with_single_vr(self):
796813
self.verify_router_publicnic_state(router, host, "eth1|eth3|eth5")
797814

798815
# 19. release new ip 3
799-
# verify the available nics in VR should be "eth0,eth1,eth2,eth3,eth4,eth5,"
816+
# verify the available nics in VR should be "eth0,eth1,eth2,eth4,eth5,"
800817
# verify the IPs in VR. eth1 -> source nat IP, eth2 -> tier 1, eth4 -> tier 2, eth5 -> new ip 6
801818
ipaddress_3.delete(self.apiclient)
802819
routers = self.get_vpc_routers(self.vpc1.id)
@@ -855,7 +872,9 @@ def test_03_acquire_public_ips_in_vpc_with_single_vr(self):
855872
self.verify_ip_address_in_router(router, host, ipaddress_6.ipaddress.ipaddress, "eth5", True)
856873
self.verify_router_publicnic_state(router, host, "eth1|eth5")
857874

858-
# Add private gateway
875+
# 23. Add private gateway
876+
# verify the available nics in VR should be "eth0,eth1,eth2,eth4,eth5,"
877+
# verify the IPs in VR. eth1 -> source nat IP, eth2 -> tier 1, eth4 -> tier 2, eth5 -> new ip 6, eth3-> private gateway
859878
private_gateway_ip = "172.16." + str(random_subnet_number + 2) + ".1"
860879
private_gateway = PrivateGateway.create(
861880
self.apiclient,
@@ -879,7 +898,9 @@ def test_03_acquire_public_ips_in_vpc_with_single_vr(self):
879898
self.verify_ip_address_in_router(router, host, ipaddress_6.ipaddress.ipaddress, "eth5", True)
880899
self.verify_router_publicnic_state(router, host, "eth1|eth3|eth5")
881900

882-
# reboot router
901+
# 24. reboot router
902+
# verify the available nics in VR should be "eth0,eth1,eth2,eth3,eth4,eth5,"
903+
# verify the IPs in VR. eth1 -> source nat IP, eth2 -> new ip 6, eth3 -> tier 1, eth4 -> private gateway, eth5 -> tier 2
883904
routers = self.get_vpc_routers(self.vpc1.id)
884905
for router in routers:
885906
cmd = rebootRouter.rebootRouterCmd()
@@ -897,7 +918,9 @@ def test_03_acquire_public_ips_in_vpc_with_single_vr(self):
897918
self.verify_ip_address_in_router(router, host, tier2_Ip, "eth5", True)
898919
self.verify_router_publicnic_state(router, host, "eth1|eth2|eth4")
899920

900-
# 23. restart VPC with cleanup
921+
# 25. restart VPC with cleanup
922+
# verify the available nics in VR should be "eth0,eth1,eth2,eth3,eth4,eth5,"
923+
# verify the IPs in VR. eth1 -> source nat IP, eth2 -> new ip 6, eth3 -> tier 1, eth4 -> private gateway, eth5 -> tier 2
901924
self.vpc1.restart(self.apiclient, cleanup=True)
902925
routers = self.get_vpc_routers(self.vpc1.id)
903926
for router in routers:
@@ -912,7 +935,9 @@ def test_03_acquire_public_ips_in_vpc_with_single_vr(self):
912935
self.verify_ip_address_in_router(router, host, tier2_Ip, "eth5", True)
913936
self.verify_router_publicnic_state(router, host, "eth1|eth2|eth4")
914937

915-
# 24. restart VPC with cleanup, makeredundant=true
938+
# 26. restart VPC with cleanup, makeredundant=true
939+
# verify the available nics in VR should be "eth0,eth1,eth2,eth3,eth4,eth5,"
940+
# verify the IPs in VR. eth1 -> source nat IP, eth2 -> new ip 6, eth3 -> tier 1, eth4 -> private gateway, eth5 -> tier 2
916941
self.vpc1.restart(self.apiclient, cleanup=True, makeredundant=True)
917942
routers = self.get_vpc_routers(self.vpc1.id)
918943
for router in routers:

test/integration/component/test_multiple_subnets_in_vpc_rvr.py

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,23 @@ def test_04_acquire_public_ips_in_vpc_with_redundant_vrs(self):
318318
# 18. release new ip 4
319319
# verify the available nics in VR should be "eth0,eth1,eth2,eth3,eth4,eth5,"
320320
# verify the IPs in VR. eth1 -> source nat IP, eth2 -> tier 1, eth3 -> new ip 3, eth4 -> tier 2, eth5 -> new ip 6
321+
# 19. release new ip 3
322+
# verify the available nics in VR should be "eth0,eth1,eth2,eth4,eth5,"
323+
# verify the IPs in VR. eth1 -> source nat IP, eth2 -> tier 1, eth4 -> tier 2, eth5 -> new ip 6
324+
# 20. restart tier1
325+
# 22. restart VPC
326+
# 23. Add private gateway
327+
# verify the available nics in VR should be "eth0,eth1,eth2,eth4,eth5,"
328+
# verify the IPs in VR. eth1 -> source nat IP, eth2 -> tier 1, eth4 -> tier 2, eth5 -> new ip 6, eth3-> private gateway
329+
# 24. reboot router
330+
# verify the available nics in VR should be "eth0,eth1,eth2,eth3,eth4,eth5,"
331+
# verify the IPs in VR. eth1 -> source nat IP, eth2 -> new ip 6, eth3 -> tier 1, eth4 -> private gateway, eth5 -> tier 2
332+
# 25. restart VPC with cleanup
333+
# verify the available nics in VR should be "eth0,eth1,eth2,eth3,eth4,eth5,"
334+
# verify the IPs in VR. eth1 -> source nat IP, eth2 -> new ip 6, eth3 -> tier 1, eth4 -> private gateway, eth5 -> tier 2
335+
# 26. restart VPC with cleanup, makeredundant=true
336+
# verify the available nics in VR should be "eth0,eth1,eth2,eth3,eth4,eth5,"
337+
# verify the IPs in VR. eth1 -> source nat IP, eth2 -> new ip 6, eth3 -> tier 1, eth4 -> private gateway, eth5 -> tier 2
321338
"""
322339

323340
# Create new domain1
@@ -796,7 +813,7 @@ def test_04_acquire_public_ips_in_vpc_with_redundant_vrs(self):
796813
self.verify_router_publicnic_state(router, host, "eth1|eth3|eth5")
797814

798815
# 19. release new ip 3
799-
# verify the available nics in VR should be "eth0,eth1,eth2,eth3,eth4,eth5,"
816+
# verify the available nics in VR should be "eth0,eth1,eth2,eth4,eth5,"
800817
# verify the IPs in VR. eth1 -> source nat IP, eth2 -> tier 1, eth4 -> tier 2, eth5 -> new ip 6
801818
ipaddress_3.delete(self.apiclient)
802819
routers = self.get_vpc_routers(self.vpc1.id)
@@ -855,7 +872,9 @@ def test_04_acquire_public_ips_in_vpc_with_redundant_vrs(self):
855872
self.verify_ip_address_in_router(router, host, ipaddress_6.ipaddress.ipaddress, "eth5", True)
856873
self.verify_router_publicnic_state(router, host, "eth1|eth5")
857874

858-
# Add private gateway
875+
# 23. Add private gateway
876+
# verify the available nics in VR should be "eth0,eth1,eth2,eth4,eth5,"
877+
# verify the IPs in VR. eth1 -> source nat IP, eth2 -> tier 1, eth4 -> tier 2, eth5 -> new ip 6, eth3-> private gateway
859878
private_gateway_ip = "172.16." + str(random_subnet_number + 2) + ".1"
860879
private_gateway = PrivateGateway.create(
861880
self.apiclient,
@@ -879,7 +898,9 @@ def test_04_acquire_public_ips_in_vpc_with_redundant_vrs(self):
879898
self.verify_ip_address_in_router(router, host, ipaddress_6.ipaddress.ipaddress, "eth5", True)
880899
self.verify_router_publicnic_state(router, host, "eth1|eth3|eth5")
881900

882-
# reboot router
901+
# 24. reboot router
902+
# verify the available nics in VR should be "eth0,eth1,eth2,eth3,eth4,eth5,"
903+
# verify the IPs in VR. eth1 -> source nat IP, eth2 -> new ip 6, eth3 -> tier 1, eth4 -> private gateway, eth5 -> tier 2
883904
routers = self.get_vpc_routers(self.vpc1.id)
884905
for router in routers:
885906
cmd = rebootRouter.rebootRouterCmd()
@@ -897,7 +918,9 @@ def test_04_acquire_public_ips_in_vpc_with_redundant_vrs(self):
897918
self.verify_ip_address_in_router(router, host, tier2_Ip, "eth5", True)
898919
self.verify_router_publicnic_state(router, host, "eth1|eth2|eth4")
899920

900-
# 23. restart VPC with cleanup
921+
# 25. restart VPC with cleanup
922+
# verify the available nics in VR should be "eth0,eth1,eth2,eth3,eth4,eth5,"
923+
# verify the IPs in VR. eth1 -> source nat IP, eth2 -> new ip 6, eth3 -> tier 1, eth4 -> private gateway, eth5 -> tier 2
901924
self.vpc1.restart(self.apiclient, cleanup=True)
902925
routers = self.get_vpc_routers(self.vpc1.id)
903926
for router in routers:
@@ -912,7 +935,9 @@ def test_04_acquire_public_ips_in_vpc_with_redundant_vrs(self):
912935
self.verify_ip_address_in_router(router, host, tier2_Ip, "eth5", True)
913936
self.verify_router_publicnic_state(router, host, "eth1|eth2|eth4")
914937

915-
# 24. restart VPC with cleanup, makeredundant=true
938+
# 26. restart VPC with cleanup, makeredundant=true
939+
# verify the available nics in VR should be "eth0,eth1,eth2,eth3,eth4,eth5,"
940+
# verify the IPs in VR. eth1 -> source nat IP, eth2 -> new ip 6, eth3 -> tier 1, eth4 -> private gateway, eth5 -> tier 2
916941
self.vpc1.restart(self.apiclient, cleanup=True, makeredundant=True)
917942
routers = self.get_vpc_routers(self.vpc1.id)
918943
for router in routers:

0 commit comments

Comments
 (0)