Shahar Havivi has uploaded a new change for review.

Change subject: v2v: refactor testSuccessfulImport test
......................................................................

v2v: refactor testSuccessfulImport test

rename to testSuccessfullVMWareImport
make vminfo as a test member for usage in future ova test

Change-Id: I30144a9f03d1d95837f43d8b5575aae1499d3c2a
Signed-off-by: Shahar Havivi <shah...@redhat.com>
---
M tests/v2vTests.py
1 file changed, 10 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/84/50584/1

diff --git a/tests/v2vTests.py b/tests/v2vTests.py
index 9c955ce..595fbe1 100644
--- a/tests/v2vTests.py
+++ b/tests/v2vTests.py
@@ -218,6 +218,14 @@
         self.volume_id_b = '00000000-0000-0000-0000-000000000004'
         self.url = 'vpx://adminr%40vsphere@0.0.0.0/ovirt/0.0.0.0?no_verify=1'
 
+        self.vminfo = {'vmName': self.vm_name,
+                       'poolID': self.pool_id,
+                       'domainID': self.domain_id,
+                       'disks': [{'imageID': self.image_id_a,
+                                  'volumeID': self.volume_id_a},
+                                 {'imageID': self.image_id_b,
+                                  'volumeID': self.volume_id_b}]}
+
     _VM_SPECS = (
         VmSpec("RHEL_0", str(uuid.uuid4())),
         VmSpec("RHEL_1", str(uuid.uuid4())),
@@ -341,17 +349,10 @@
 
     @MonkeyPatch(v2v, '_VIRT_V2V', FAKE_VIRT_V2V)
     @MonkeyPatch(v2v, '_V2V_DIR', tempfile.mkdtemp())
-    def testSuccessfulImport(self):
-        vminfo = {'vmName': self.vm_name,
-                  'poolID': self.pool_id,
-                  'domainID': self.domain_id,
-                  'disks': [{'imageID': self.image_id_a,
-                             'volumeID': self.volume_id_a},
-                            {'imageID': self.image_id_b,
-                             'volumeID': self.volume_id_b}]}
+    def testSuccessfulVMWareImport(self):
         command = v2v.LibvirtCommand(self.url, 'root',
                                      ProtectedPassword('mypassword'),
-                                     vminfo, self.job_id, FakeIRS())
+                                     self.vminfo, self.job_id, FakeIRS())
         ivm = v2v.ImportVm(self.job_id, command)
         ivm.start()
         ivm.wait()


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I30144a9f03d1d95837f43d8b5575aae1499d3c2a
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Shahar Havivi <shav...@redhat.com>
_______________________________________________
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to