Change in vdsm[master]: net tests: minor libvirt_tests style refactoring
gerrit-hooks has posted comments on this change. Change subject: net tests: minor libvirt_tests style refactoring .. Patch Set 7: * Update Tracker::IGNORE, no bug url/s found * Set MODIFIED::IGNORE, no Bug-Url found. -- To view, visit https://gerrit.ovirt.org/65091 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I64dedb9859d204082a1516574e9b8650a3e4ffe5 Gerrit-PatchSet: 7 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Petr Horáček Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: net tests: minor libvirt_tests style refactoring
Dan Kenigsberg has submitted this change and it was merged. Change subject: net tests: minor libvirt_tests style refactoring .. net tests: minor libvirt_tests style refactoring Change-Id: I64dedb9859d204082a1516574e9b8650a3e4ffe5 Signed-off-by: Petr Horáček Reviewed-on: https://gerrit.ovirt.org/65091 Continuous-Integration: Jenkins CI Reviewed-by: Edward Haas Reviewed-by: Dan Kenigsberg --- M tests/network/libvirt_test.py 1 file changed, 28 insertions(+), 28 deletions(-) Approvals: Jenkins CI: Passed CI tests Petr Horáček: Verified Dan Kenigsberg: Looks good to me, approved Edward Haas: Looks good to me, but someone else must approve -- To view, visit https://gerrit.ovirt.org/65091 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I64dedb9859d204082a1516574e9b8650a3e4ffe5 Gerrit-PatchSet: 7 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Petr Horáček Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček Gerrit-Reviewer: gerrit-hooks ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: net tests: minor libvirt_tests style refactoring
Dan Kenigsberg has posted comments on this change. Change subject: net tests: minor libvirt_tests style refactoring .. Patch Set 6: Code-Review+2 -- To view, visit https://gerrit.ovirt.org/65091 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I64dedb9859d204082a1516574e9b8650a3e4ffe5 Gerrit-PatchSet: 6 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Petr Horáček Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: net tests: minor libvirt_tests style refactoring
Petr Horáček has posted comments on this change. Change subject: net tests: minor libvirt_tests style refactoring .. Patch Set 6: Verified+1 libvirt test passed OK -- To view, visit https://gerrit.ovirt.org/65091 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I64dedb9859d204082a1516574e9b8650a3e4ffe5 Gerrit-PatchSet: 6 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Petr Horáček Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: net tests: minor libvirt_tests style refactoring
Edward Haas has posted comments on this change. Change subject: net tests: minor libvirt_tests style refactoring .. Patch Set 6: Code-Review+1 -- To view, visit https://gerrit.ovirt.org/65091 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I64dedb9859d204082a1516574e9b8650a3e4ffe5 Gerrit-PatchSet: 6 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Petr Horáček Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: net tests: minor libvirt_tests style refactoring
gerrit-hooks has posted comments on this change. Change subject: net tests: minor libvirt_tests style refactoring .. Patch Set 6: * Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/65091 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I64dedb9859d204082a1516574e9b8650a3e4ffe5 Gerrit-PatchSet: 6 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Petr Horáček Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: net tests: minor libvirt_tests style refactoring
Edward Haas has posted comments on this change. Change subject: net tests: minor libvirt_tests style refactoring .. Patch Set 5: Code-Review+1 -- To view, visit https://gerrit.ovirt.org/65091 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I64dedb9859d204082a1516574e9b8650a3e4ffe5 Gerrit-PatchSet: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Petr Horáček Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: net tests: minor libvirt_tests style refactoring
gerrit-hooks has posted comments on this change. Change subject: net tests: minor libvirt_tests style refactoring .. Patch Set 5: * Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/65091 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I64dedb9859d204082a1516574e9b8650a3e4ffe5 Gerrit-PatchSet: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Petr Horáček Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: net tests: minor libvirt_tests style refactoring
gerrit-hooks has posted comments on this change. Change subject: net tests: minor libvirt_tests style refactoring .. Patch Set 4: * Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/65091 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I64dedb9859d204082a1516574e9b8650a3e4ffe5 Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Petr Horáček Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: net tests: minor libvirt_tests style refactoring
gerrit-hooks has posted comments on this change. Change subject: net tests: minor libvirt_tests style refactoring .. Patch Set 3: * Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/65091 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I64dedb9859d204082a1516574e9b8650a3e4ffe5 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Petr Horáček Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: net tests: minor libvirt_tests style refactoring
Petr Horáček has posted comments on this change. Change subject: net tests: minor libvirt_tests style refactoring .. Patch Set 1: Verified+1 Tests passed. -- To view, visit https://gerrit.ovirt.org/65091 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I64dedb9859d204082a1516574e9b8650a3e4ffe5 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Petr Horáček Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: net tests: minor libvirt_tests style refactoring
Petr Horáček has uploaded a new change for review. Change subject: net tests: minor libvirt_tests style refactoring .. net tests: minor libvirt_tests style refactoring Change-Id: I64dedb9859d204082a1516574e9b8650a3e4ffe5 --- M tests/network/libvirt_test.py 1 file changed, 28 insertions(+), 28 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/91/65091/1 diff --git a/tests/network/libvirt_test.py b/tests/network/libvirt_test.py index 95cc240..b62351a 100644 --- a/tests/network/libvirt_test.py +++ b/tests/network/libvirt_test.py @@ -28,41 +28,41 @@ from testlib import VdsmTestCase as TestCaseBase +NETWORK = 'awesome_net' +LIBVIRT_NETWORK = 'vdsm-' + NETWORK +IFACE = 'dummy' + + @attr(type='unit') class LibvirtTests(TestCaseBase): -def assertEqualXml(self, a, b, msg=None): -""" -Compare two xml strings for equality. -""" +def assertEqualXml(self, a, b): +"""Compare two xml strings for equality""" -aXml = ET.tostring(ET.fromstring(a)) -bXml = ET.tostring(ET.fromstring(b)) +a_xml = ET.tostring(ET.fromstring(a)) +b_xml = ET.tostring(ET.fromstring(b)) -aXmlNrml = re.sub('>\s*\n\s*<', '><', aXml).strip() -bXmlNrml = re.sub('>\s*\n\s*<', '><', bXml).strip() +a_xml_normalized = re.sub('>\s*\n\s*<', '><', a_xml).strip() +b_xml_normalized = re.sub('>\s*\n\s*<', '><', b_xml).strip() -self.assertEqual(aXmlNrml, bXmlNrml, msg) +self.assertEqual(a_xml_normalized, b_xml_normalized) -def testCreateNetXmlBridged(self): -expectedDoc = """ - vdsm-awesome_net - - - """ -actualDoc = libvirt.createNetworkDef('awesome_net', bridged=True) +def test_create_net_xml_with_bridge(self): +expected_doc = """ +{} + + + """.format(LIBVIRT_NETWORK, NETWORK) +actual_doc = libvirt.createNetworkDef(NETWORK, bridged=True) +self.assertEqualXml(expected_doc, actual_doc) -self.assertEqualXml(expectedDoc, actualDoc) - -def testCreateNetXml(self): -iface = "dummy" -expectedDoc = (""" -vdsm-awesome_net +def test_create_net_xml_with_iface(self): +expected_doc = """ +{} - + - """ % iface) -actualDoc = libvirt.createNetworkDef('awesome_net', bridged=False, - iface=iface) - -self.assertEqualXml(expectedDoc, actualDoc) + """.format(LIBVIRT_NETWORK, IFACE) +actual_doc = libvirt.createNetworkDef( +NETWORK, bridged=False, iface=IFACE) +self.assertEqualXml(expected_doc, actual_doc) -- To view, visit https://gerrit.ovirt.org/65091 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I64dedb9859d204082a1516574e9b8650a3e4ffe5 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Petr Horáček ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org