Fix redundant router deployment tests

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
This commit is contained in:
Prasanna Santhanam 2013-08-09 12:08:16 +05:30
parent bad72a0aeb
commit b3fb75e6c6

View File

@ -196,7 +196,7 @@ class TestRvRDeploymentPlanning(cloudstackTestCase):
try: try:
cleanup_resources(self.apiclient, self.cleanup) cleanup_resources(self.apiclient, self.cleanup)
except Exception as e: except Exception as e:
self.debug("Warning: Exception during cleanup : %s" % e) self.warn("Warning: Exception during cleanup : %s" % e)
#raise Exception("Warning: Exception during cleanup : %s" % e) #raise Exception("Warning: Exception during cleanup : %s" % e)
return return
@ -391,7 +391,7 @@ class TestRvRDeploymentPlanning(cloudstackTestCase):
cmd.allocationstate = 'Disabled' cmd.allocationstate = 'Disabled'
self.apiclient.updatePod(cmd) self.apiclient.updatePod(cmd)
self.debug("Warning: Disabled all pods in zone") self.warn("Warning: Disabled all pods in zone")
cmd = updatePod.updatePodCmd() cmd = updatePod.updatePodCmd()
cmd.id = pods[0].id cmd.id = pods[0].id
@ -528,11 +528,12 @@ class TestRvRDeploymentPlanning(cloudstackTestCase):
allocationstate="Disabled" allocationstate="Disabled"
) )
for pod in pods: if pods is not None:
cmd = updatePod.updatePodCmd() for pod in pods:
cmd.id = pod.id cmd = updatePod.updatePodCmd()
cmd.allocationstate = 'Enabled' cmd.id = pod.id
self.apiclient.updatePod(cmd) cmd.allocationstate = 'Enabled'
self.apiclient.updatePod(cmd)
return return
@attr(tags=["advanced", "advancedns"]) @attr(tags=["advanced", "advancedns"])
@ -611,7 +612,7 @@ class TestRvRDeploymentPlanning(cloudstackTestCase):
cmd.allocationstate = 'Disabled' cmd.allocationstate = 'Disabled'
self.apiclient.updatePod(cmd) self.apiclient.updatePod(cmd)
self.debug("Warning: Disabled all pods in zone") self.warn("Warning: Disabled all pods in zone")
cmd = updatePod.updatePodCmd() cmd = updatePod.updatePodCmd()
cmd.id = pods[0].id cmd.id = pods[0].id
@ -627,7 +628,7 @@ class TestRvRDeploymentPlanning(cloudstackTestCase):
cmd.allocationstate = 'Disabled' cmd.allocationstate = 'Disabled'
self.apiclient.updateCluster(cmd) self.apiclient.updateCluster(cmd)
self.debug("Warning: Disabled all pods in zone") self.warn("Warning: Disabled all pods in zone")
cmd = updateCluster.updateClusterCmd() cmd = updateCluster.updateClusterCmd()
cmd.id = clusters[0].id cmd.id = clusters[0].id
@ -751,17 +752,12 @@ class TestRvRDeploymentPlanning(cloudstackTestCase):
listall=True, listall=True,
allocationstate="Disabled" allocationstate="Disabled"
) )
self.assertEqual( if pods is not None:
isinstance(pods, list), for pod in pods:
True, cmd = updatePod.updatePodCmd()
"List pods should not return an empty response" cmd.id = pod.id
) cmd.allocationstate = 'Enabled'
self.apiclient.updatePod(cmd)
for pod in pods:
cmd = updatePod.updatePodCmd()
cmd.id = pod.id
cmd.allocationstate = 'Enabled'
self.apiclient.updatePod(cmd)
clusters = Cluster.list( clusters = Cluster.list(
self.apiclient, self.apiclient,
@ -770,11 +766,12 @@ class TestRvRDeploymentPlanning(cloudstackTestCase):
listall=True listall=True
) )
for cluster in clusters: if clusters is not None:
cmd = updateCluster.updateClusterCmd() for cluster in clusters:
cmd.id = cluster.id cmd = updateCluster.updateClusterCmd()
cmd.allocationstate = 'Enabled' cmd.id = cluster.id
self.apiclient.updateCluster(cmd) cmd.allocationstate = 'Enabled'
self.apiclient.updateCluster(cmd)
return return
@attr(tags=["advanced", "advancedns", "ssh"]) @attr(tags=["advanced", "advancedns", "ssh"])
@ -852,7 +849,7 @@ class TestRvRDeploymentPlanning(cloudstackTestCase):
cmd.allocationstate = 'Disabled' cmd.allocationstate = 'Disabled'
self.apiclient.updatePod(cmd) self.apiclient.updatePod(cmd)
self.debug("Warning: Disabled all pods in zone") self.warn("Warning: Disabled all pods in zone")
cmd = updatePod.updatePodCmd() cmd = updatePod.updatePodCmd()
cmd.id = pods[0].id cmd.id = pods[0].id
@ -868,7 +865,7 @@ class TestRvRDeploymentPlanning(cloudstackTestCase):
cmd.allocationstate = 'Disabled' cmd.allocationstate = 'Disabled'
self.apiclient.updateCluster(cmd) self.apiclient.updateCluster(cmd)
self.debug("Warning: Disabled all pods in zone") self.warn("Warning: Disabled all pods in zone")
cmd = updateCluster.updateClusterCmd() cmd = updateCluster.updateClusterCmd()
cmd.id = clusters[0].id cmd.id = clusters[0].id