Change in vdsm[master]: v2v: add test testSuccessfulImportOVA
nsoffer at redhat.com
nsoffer at redhat.com
Fri Dec 18 01:05:16 UTC 2015
Nir Soffer has posted comments on this change.
Change subject: v2v: add test testSuccessfulImportOVA
......................................................................
Patch Set 2:
(2 comments)
https://gerrit.ovirt.org/#/c/50585/2/tests/v2vTests.py
File tests/v2vTests.py:
Line 354: v2v.convert_ova(ovapath, self.vminfo, self.job_id, FakeIRS())
Line 355: job = v2v._jobs[self.job_id]
Line 356: job.wait()
Line 357:
Line 358: self.assertEqual(job.status, v2v.STATUS.DONE)
Ensure job is deleted even if the assert fails.
v2v.convert_ova(...)
try:
job = v2v_jobs[self.job_id]
job.wait()
assert ...
finally:
v2v._jobs.clear()
Line 359: v2v.delete_job(self.job_id)
Line 360:
Line 361: def testV2VOutput(self):
Line 362: cmd = [FAKE_VIRT_V2V.cmd,
Line 355: job = v2v._jobs[self.job_id]
Line 356: job.wait()
Line 357:
Line 358: self.assertEqual(job.status, v2v.STATUS.DONE)
Line 359: v2v.delete_job(self.job_id)
Using the api to delete jobs is not a good idea. You want to test this code separately. Here we like to make sure the all jobs are cleared, so better clear the jobs directly.
Line 360:
Line 361: def testV2VOutput(self):
Line 362: cmd = [FAKE_VIRT_V2V.cmd,
Line 363: '-ic', self.url,
--
To view, visit https://gerrit.ovirt.org/50585
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I465d68e5f42f6f5829d33bf62c2d40412a8aead4
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Shahar Havivi <shavivi at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Shahar Havivi <shavivi at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list