mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 11:52:28 +01:00
CLOUDSTACK-4262: Fix TestVPCNetworkGc.test_01_wait_network_gc
As per the test plan, after waiting for network gc LB rules should be cleared. Added that check instead of router being in stopped state. Signed-off-by: venkataswamybabu budumuru <venkataswamybabu.budumuru@citrix.com> (cherry picked from commit abdb84bb05abc9f2bd102bca1c1b34865f34d771)
This commit is contained in:
parent
cf4a612cdb
commit
fbf057a323
@ -2382,26 +2382,16 @@ class TestVPCNetworkGc(cloudstackTestCase):
|
||||
self.debug("Waiting for network garbage collection thread to run")
|
||||
# Wait for the network garbage collection thread to run
|
||||
wait_for_cleanup(self.apiclient,
|
||||
["network.gc.interval", "network.gc.wait"]*2)
|
||||
self.debug("Check if the VPC router is in stopped state?")
|
||||
routers = Router.list(
|
||||
self.apiclient,
|
||||
account=self.account.name,
|
||||
domainid=self.account.domainid,
|
||||
listall=True
|
||||
)
|
||||
self.assertEqual(
|
||||
isinstance(routers, list),
|
||||
True,
|
||||
"List routers shall return a valid response"
|
||||
)
|
||||
router = routers[0]
|
||||
# TODO: Add some more assertions
|
||||
self.assertEqual(
|
||||
router.state,
|
||||
"Stopped",
|
||||
"Router state should be stopped after network gc"
|
||||
)
|
||||
["network.gc.interval", "network.gc.wait"])
|
||||
|
||||
#Bug???: Network Acls are not cleared
|
||||
netacls = NetworkACL.list(self.apiclient, networkid=self.network_1.id)
|
||||
self.debug("List of NetACLS %s" % netacls)
|
||||
self.assertEqual(netacls, None, "Netacls were not cleared after network GC thread is run")
|
||||
|
||||
lbrules = LoadBalancerRule.list(self.apiclient, networkid=self.network_1.id)
|
||||
self.debug("List of LB Rules %s" % lbrules)
|
||||
self.assertEqual(lbrules, None, "LBrules were not cleared after network GC thread is run")
|
||||
return
|
||||
|
||||
@attr(tags=["advanced", "intervlan"])
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user