Francesco Romani has posted comments on this change. Change subject: tests: v2v: add test for commit fb4c72a ......................................................................
Patch Set 2: (2 comments) https://gerrit.ovirt.org/#/c/47364/2/tests/v2vTests.py File tests/v2vTests.py: Line 88: Line 89: def storageVolLookupByPath(self, name): Line 90: if self._storage_lookup_fail: Line 91: e = fake.Error(libvirt.VIR_ERR_INTERNAL_ERROR) Line 92: raise e > Introducing flags such as _storage_lookup_fail is more complicated then Done Line 93: return LibvirtMock.Volume() Line 94: Line 95: class Volume(object): Line 96: def info(self): Line 212: if not v2v.supported(): Line 213: raise SkipTest('v2v is not supported current os version') Line 214: Line 215: def _connect(uri, username, passwd): Line 216: return LibvirtMock(storage_lookup_fail=True) > We can do it in a simpler way: yes, this is way nicer and simpler. Will switch to this idiom. Line 217: Line 218: with MonkeyPatchScope([(libvirtconnection, 'open_connection', Line 219: _connect)]): Line 220: vms = v2v.get_external_vms('esx://mydomain', 'user', -- To view, visit https://gerrit.ovirt.org/47364 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iad523dc7c34276c6811513220cd7230ca5fc6e45 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani <from...@redhat.com> Gerrit-Reviewer: Dan Kenigsberg <dan...@redhat.com> Gerrit-Reviewer: Francesco Romani <from...@redhat.com> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer <nsof...@redhat.com> Gerrit-Reviewer: Shahar Havivi <shav...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches