You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ro...@apache.org on 2021/02/22 07:59:52 UTC

[cloudstack] branch master updated: marvin: Bypass tests on Simulator (#4712)

This is an automated email from the ASF dual-hosted git repository.

rohit pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/master by this push:
     new 97e97c3  marvin: Bypass tests on Simulator (#4712)
97e97c3 is described below

commit 97e97c34f2c574afe70e97a106bdb51e06ed2879
Author: Pearl Dsilva <pe...@gmail.com>
AuthorDate: Mon Feb 22 13:29:27 2021 +0530

    marvin: Bypass tests on Simulator (#4712)
    
    Co-authored-by: Pearl Dsilva <pe...@shapeblue.com>
---
 test/integration/smoke/test_network.py | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/test/integration/smoke/test_network.py b/test/integration/smoke/test_network.py
index 70b4bbc..fd1e4e6 100644
--- a/test/integration/smoke/test_network.py
+++ b/test/integration/smoke/test_network.py
@@ -1862,6 +1862,7 @@ class TestSharedNetwork(cloudstackTestCase):
         # Create Network Offering
         cls.services["shared_network_offering"]["specifyVlan"] = "True"
         cls.services["shared_network_offering"]["specifyIpRanges"] = "True"
+        cls.hv = cls.testClient.getHypervisorInfo()
         cls.shared_network_offering = NetworkOffering.create(cls.apiclient, cls.services["shared_network_offering"],
                                                              conservemode=False)
 
@@ -1884,6 +1885,7 @@ class TestSharedNetwork(cloudstackTestCase):
                                             zoneid=cls.zone.id)
         cls._cleanup = [
             cls.service_offering,
+            cls.shared_network,
             cls.shared_network_offering
         ]
         return
@@ -1960,6 +1962,8 @@ class TestSharedNetwork(cloudstackTestCase):
 
     @attr(tags=["advanced", "shared"])
     def test_01_deployVMInSharedNetwork(self):
+        if self.hv.lower() == 'simulator':
+            self.skipTest("Hypervisor is simulator - skipping Test..")
         try:
             self.virtual_machine = VirtualMachine.create(self.apiclient, self.services["virtual_machine"],
                                                          networkids=[self.shared_network.id],
@@ -1993,6 +1997,8 @@ class TestSharedNetwork(cloudstackTestCase):
 
     @attr(tags=["advanced", "shared"])
     def test_02_verifyRouterIpAfterNetworkRestart(self):
+        if self.hv.lower() == 'simulator':
+            self.skipTest("Hypervisor is simulator - skipping Test..")
         routerIp = self.services["shared_network"]["routerip"]
         self.debug("restarting network with cleanup")
         try:
@@ -2018,12 +2024,14 @@ class TestSharedNetwork(cloudstackTestCase):
 
     @attr(tags=["advanced", "shared"])
     def test_03_destroySharedNetwork(self):
+        if self.hv.lower() == 'simulator':
+            self.skipTest("Hypervisor is simulator - skipping Test..")
         routerIp = self.services["shared_network"]["routerip"]
         try:
             self.shared_network.delete(self.apiclient)
         except Exception as e:
             self.fail("Failed to destroy the shared network")
-
+        self._cleanup.remove(self.shared_network)
         self.debug("Fetch the placeholder record for the router")
         nic_ip_address = self.dbclient.execute(
             "select ip4_address from nics where strategy='Placeholder' and ip4_address = '%s' and removed is NOT NULL;" % routerIp);