Change in vdsm[master]: tests: bootstrap sparsify tests

fromani at redhat.com fromani at redhat.com
Wed Nov 18 11:12:42 UTC 2015


Francesco Romani has posted comments on this change.

Change subject: tests: bootstrap sparsify tests
......................................................................


Patch Set 2:

(2 comments)

https://gerrit.ovirt.org/#/c/48715/2/tests/sparsifyTests.py
File tests/sparsifyTests.py:

Line 27: 
Line 28: class FakeCommand(object):
Line 29:     def __init__(self):
Line 30:         # as per manpage, false ignores any argument
Line 31:         self.cmd = '/bin/false'
> Nice - but this is simpler:
Done
Line 32: 
Line 33: 
Line 34: class VirtSparsifyTests(TestCaseBase):
Line 35: 


Line 35: 
Line 36:     @MonkeyPatch(virtsparsify, '_VIRTSPARSIFY', FakeCommand())
Line 37:     def test_raise_error_on_failure(self):
Line 38: 
Line 39:         FAKE_VOLUME = '/we/dont/care/about/this/path'
> Can we avoid these constants inside functions? constants should live in the
Of course. Done.
Line 40: 
Line 41:         self.assertRaises(cmdutils.Error,
Line 42:                           virtsparsify.sparsify,


-- 
To view, visit https://gerrit.ovirt.org/48715
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I39bcf7b1f8cf048c6f12de2d6fdfe9bab2407cec
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list