Marcin Mirecki has uploaded a new change for review.

Change subject: vm: add test for nic unplug wait
......................................................................

vm: add test for nic unplug wait

Change-Id: I4603efa0739c9bd50777a157c946da3ba8544729
Signed-off-by: Marcin Mirecki <mmire...@redhat.com>
Bug-Url: https://bugzilla.redhat.com/1134256
Reviewed-on: https://gerrit.ovirt.org/49104
Tested-by: Nir Soffer <nsof...@redhat.com>
Reviewed-by: Nir Soffer <nsof...@redhat.com>
Continuous-Integration: Jenkins CI
---
M tests/vmTests.py
1 file changed, 15 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/71/49671/1

diff --git a/tests/vmTests.py b/tests/vmTests.py
index 2b2d8b0..bad95cb 100644
--- a/tests/vmTests.py
+++ b/tests/vmTests.py
@@ -43,6 +43,7 @@
 from virt import vmstatus
 from virt.vmdevices.storage import Drive
 from virt.vmdevices.storage import DISK_TYPE
+from virt.vmdevices.network import Interface
 from vdsm import constants
 from vdsm import define
 from vdsm import password
@@ -1284,12 +1285,20 @@
         <source dev='/block_path'/>
     </disk>"""
 
+    NIC_XML = """
+    <interface>
+      <mac address='macAddr'/>
+    </interface>
+    """
+
     drive_file = Drive({}, log=logging.getLogger(''), index=0, iface="",
                        path='test_path',  diskType=DISK_TYPE.FILE)
     drive_network = Drive({}, log=logging.getLogger(''), index=0, iface="",
                           path='test_path', diskType=DISK_TYPE.NETWORK)
     drive_block = Drive({}, log=logging.getLogger(''), index=0, iface="",
                         path="/block_path", diskType=DISK_TYPE.BLOCK)
+    interface = Interface({}, log=logging.getLogger(''), macAddr="macAddr",
+                          device='bridge', name='')
 
     @MonkeyPatch(vm, "config", make_config([
         ("vars", "hotunplug_timeout", "0.25"),
@@ -1298,7 +1307,8 @@
     @MonkeyPatch(utils, "isBlockDevice", lambda x: x == "/block_path")
     @permutations([[drive_file, FILE_DRIVE_XML],
                    [drive_network, NETWORK_DRIVE_XML],
-                   [drive_block, BLOCK_DRIVE_XML]])
+                   [drive_block, BLOCK_DRIVE_XML],
+                   [interface, NIC_XML]])
     def test_timeout(self, device, matching_xml):
         testvm = TestingVm(WaitForRemovalFakeVmDom(matching_xml,
                                                    times_to_match=9))
@@ -1314,7 +1324,8 @@
     @MonkeyPatch(utils, "isBlockDevice", lambda x: x == "/block_path")
     @permutations([[drive_file, FILE_DRIVE_XML],
                    [drive_network, NETWORK_DRIVE_XML],
-                   [drive_block, BLOCK_DRIVE_XML]])
+                   [drive_block, BLOCK_DRIVE_XML],
+                   [interface, NIC_XML]])
     def test_removed_on_first_check(self, device, matching_xml):
         testvm = TestingVm(WaitForRemovalFakeVmDom(matching_xml))
         testvm._waitForDeviceRemoval(device)
@@ -1327,7 +1338,8 @@
     @MonkeyPatch(utils, "isBlockDevice", lambda x: x == "/block_path")
     @permutations([[drive_file, FILE_DRIVE_XML],
                    [drive_network, NETWORK_DRIVE_XML],
-                   [drive_block, BLOCK_DRIVE_XML]])
+                   [drive_block, BLOCK_DRIVE_XML],
+                   [interface, NIC_XML]])
     def test_removed_on_x_check(self, device, matching_xml):
         testvm = TestingVm(WaitForRemovalFakeVmDom(matching_xml,
                                                    times_to_match=2))


-- 
To view, visit https://gerrit.ovirt.org/49671
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4603efa0739c9bd50777a157c946da3ba8544729
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.6
Gerrit-Owner: Marcin Mirecki <mmire...@redhat.com>
_______________________________________________
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to