Ido Barkan has uploaded a new change for review. Change subject: unbreak testHostSampleHandlesDisappearingVlanInterfaces when libvirtd is stopped ......................................................................
unbreak testHostSampleHandlesDisappearingVlanInterfaces when libvirtd is stopped Change-Id: I77f5f2298cf6202d80f54d736ef20646d7d4a04e Signed-off-by: Ido Barkan <ibar...@redhat.com> --- M tests/samplingTests.py 1 file changed, 10 insertions(+), 7 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/46/40346/1 diff --git a/tests/samplingTests.py b/tests/samplingTests.py index 2624dd7..3d53180 100644 --- a/tests/samplingTests.py +++ b/tests/samplingTests.py @@ -163,7 +163,6 @@ interfaces_diff = interfaces_after - interfaces_before self.assertEqual(interfaces_diff, set([dummy_name])) - @brokentest("Broken unless libvirtd is running") @MonkeyPatch(libvirtconnection, '_read_password', read_password) @ValidateRunningAsRoot def testHostSampleHandlesDisappearingVlanInterfaces(self): @@ -174,12 +173,16 @@ ipwrapper.linkDel(self.NEW_VLAN) return iter(all_links) - with MonkeyPatchScope( - [(ipwrapper, 'getLinks', faultyGetLinks)]): - with dummy_if() as dummy_name: - with vlan(self.NEW_VLAN, dummy_name, 999): - hs = sampling.HostSample(os.getpid()) - self.assertNotIn(self.NEW_VLAN, hs.interfaces) + class NumaNodeMemorySampleMock(object): + pass + + with MonkeyPatchScope([(ipwrapper, 'getLinks', faultyGetLinks)]): + with MonkeyPatchScope([(sampling, 'NumaNodeMemorySample', + NumaNodeMemorySampleMock)]): + with dummy_if() as dummy_name: + with vlan(self.NEW_VLAN, dummy_name, 999): + hs = sampling.HostSample(os.getpid()) + self.assertNotIn(self.NEW_VLAN, hs.interfaces) @expandPermutations -- To view, visit https://gerrit.ovirt.org/40346 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I77f5f2298cf6202d80f54d736ef20646d7d4a04e Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Ido Barkan <ibar...@redhat.com> _______________________________________________ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches