Change in vdsm[master]: virt: add unit test for getUnderlying* family of methods
fromani at redhat.com
fromani at redhat.com
Tue Mar 31 15:59:38 UTC 2015
Francesco Romani has posted comments on this change.
Change subject: virt: add unit test for getUnderlying* family of methods
......................................................................
Patch Set 1:
(5 comments)
initial review
https://gerrit.ovirt.org/#/c/39364/1//COMMIT_MSG
Commit Message:
Line 3: AuthorDate: 2015-03-30 16:27:18 +0200
Line 4: Commit: Martin Polednik <mpolednik at redhat.com>
Line 5: CommitDate: 2015-03-30 16:27:18 +0200
Line 6:
Line 7: virt: add unit test for getUnderlying* family of methods
if this is not a draft, either please clearly mark as WIP or provide a bit more context.
Line 8:
Line 9: Change-Id: If202340d8f26cb79d2a8d306a114cd6dc39dada0
https://gerrit.ovirt.org/#/c/39364/1/tests/Makefile.am
File tests/Makefile.am:
Line 21: include $(top_srcdir)/build-aux/Makefile.subs
Line 22:
Line 23: SUBDIRS = \
Line 24: functional \
Line 25: device_tests \
given that we are under tests/, do we really need the _tests suffix?
Line 26: $(NULL)
Line 27:
Line 28: test_modules = \
Line 29: alignmentScanTests.py \
https://gerrit.ovirt.org/#/c/39364/1/tests/device_tests/Makefile.am
File tests/device_tests/Makefile.am:
Line 25: xmlParsingTests.py \
Line 26: $(NULL)
Line 27:
Line 28: dist_vdsmdevtests_DATA = \
Line 29: testComplexVm.xml \
pep8 names? I don't really mind, your call.
https://gerrit.ovirt.org/#/c/39364/1/tests/device_tests/xmlParsingTests.py
File tests/device_tests/xmlParsingTests.py:
Line 6: import devices as device_tools
Line 7:
Line 8: class TestDeviceXmlParsing(XMLTestCase):
Line 9:
Line 10: def testDeviceParsedXML(self):
new module -> we can use pep8 naming! :)
Line 11: params = {
Line 12: 'nicModel': 'rtl8139,pv', 'name': 'complexVm',
Line 13: 'displaySecurePort': '-1', 'memSize': '256', 'displayPort': '-1',
Line 14: 'display': 'qxl'}
Line 38: {'device': 'rng', 'specParams': {'source': 'random'},
Line 39: 'model': 'virtio', 'type': 'rng'}]
Line 40:
Line 41: domain = None
Line 42: with open('./testComplexVm.xml', 'r') as domxml:
not sure about this path. Please look around tests/vmApiTests.py:42 for a (supposedly) more robust and flexible approach
Line 43: domain = domxml.read()
Line 44:
Line 45: with fake.VM(params=params, devices=devices) as vm:
Line 46: vm._domain = domain_descriptor.DomainDescriptor(domain)
--
To view, visit https://gerrit.ovirt.org/39364
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: If202340d8f26cb79d2a8d306a114cd6dc39dada0
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Polednik <mpolednik at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list