Assaf Muller has uploaded a new change for review.
Change subject: Added netinfoTests:testGetEmpty ......................................................................
Added netinfoTests:testGetEmpty
The new test should prevent the regression introduced in: http://gerrit.ovirt.org/#/c/21652/
And fixed in: http://gerrit.ovirt.org/#/c/21850/
Change-Id: Ibfb1d18eeb697de6bf8d35ab9748a61324fde9ac Signed-off-by: Assaf Muller amuller@redhat.com --- M tests/netinfoTests.py 1 file changed, 11 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/81/21881/1
diff --git a/tests/netinfoTests.py b/tests/netinfoTests.py index 6886c0b..8001f40 100644 --- a/tests/netinfoTests.py +++ b/tests/netinfoTests.py @@ -97,6 +97,17 @@ # it should. netinfo.get()
+ @MonkeyPatch(netinfo, 'getLinks', lambda: []) + @MonkeyPatch(netinfo, 'networks', lambda: {}) + def testGetEmpty(self): + result = {} + result.update(netinfo.get()) + self.assertEqual(result['networks'], {}) + self.assertEqual(result['bridges'], {}) + self.assertEqual(result['nics'], {}) + self.assertEqual(result['bondings'], {}) + self.assertEqual(result['vlans'], {}) + def testIPv4toMapped(self): self.assertEqual('::ffff:127.0.0.1', netinfo.IPv4toMapped('127.0.0.1'))
Assaf Muller has posted comments on this change.
Change subject: Added netinfoTests:testGetEmpty ......................................................................
Patch Set 1: Verified+1
I ran the unit test without Toni's fix and the test picked up the regression. The test passes with the fix.
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Added netinfoTests:testGetEmpty ......................................................................
Patch Set 1:
Build Successful
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/5836/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/5928/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/5040/ : SUCCESS
Antoni Segura Puimedon has posted comments on this change.
Change subject: Added netinfoTests:testGetEmpty ......................................................................
Patch Set 1: Code-Review+1
Dan Kenigsberg has posted comments on this change.
Change subject: Added netinfoTests:testGetEmpty ......................................................................
Patch Set 1: Code-Review+2
Dan Kenigsberg has submitted this change and it was merged.
Change subject: Added netinfoTests:testGetEmpty ......................................................................
Added netinfoTests:testGetEmpty
The new test should prevent the regression introduced in: http://gerrit.ovirt.org/#/c/21652/
And fixed in: http://gerrit.ovirt.org/#/c/21850/
Change-Id: Ibfb1d18eeb697de6bf8d35ab9748a61324fde9ac Signed-off-by: Assaf Muller amuller@redhat.com Reviewed-on: http://gerrit.ovirt.org/21881 Reviewed-by: Antoni Segura Puimedon asegurap@redhat.com Reviewed-by: Dan Kenigsberg danken@redhat.com --- M tests/netinfoTests.py 1 file changed, 11 insertions(+), 0 deletions(-)
Approvals: Antoni Segura Puimedon: Looks good to me, but someone else must approve Assaf Muller: Verified Dan Kenigsberg: Looks good to me, approved
vdsm-patches@lists.fedorahosted.org