Change in vdsm[master]: tests: Add miniaml issciadm tests

nsoffer at redhat.com nsoffer at redhat.com
Wed Oct 23 15:42:25 UTC 2013


Nir Soffer has posted comments on this change.

Change subject: tests: Add miniaml issciadm tests
......................................................................


Patch Set 10:

(3 comments)

Address Dan comments.

....................................................
Commit Message
Line 3: AuthorDate: 2013-10-03 20:39:34 +0300
Line 4: Commit:     Nir Soffer <nsoffer at redhat.com>
Line 5: CommitDate: 2013-10-23 16:15:15 +0300
Line 6: 
Line 7: tests: Add miniaml issciadm tests
Done
Line 8: 
Line 9: Add miniaml tests for iscsiadm module before modifying it to support
Line 10: debug output (BZ 1011075).
Line 11: 


Line 11: 
Line 12: These tests do not test the iscsiadm command line tool; they ensure that
Line 13: we invoke it correctly and handle its exit code, stdout and stderr.
Line 14: 
Line 15: This patch introduce a new fake module useful for faking dependencies
Done
Line 16: during unittests. I could add it in another patch, but I don't want to
Line 17: create unneeded dependencies.
Line 18: 
Line 19: Change-Id: I9ed21408c7b496c384053ce02cdb66d47df9a14b


....................................................
File tests/iscsiadmTests.py
Line 45:                          misc.execCmd.result)
Line 46:         self.assertEqual(misc.execCmd.args,
Line 47:                          ([constants.EXT_ISCSIADM, 'a', 'b'],))
Line 48:         self.assertEqual(misc.execCmd.kw,
Line 49:                          {'sudo': True, 'printable': None})
_runCmd invokes misc.execCmd with the sudo parameter - it would nice to know that it still does it after you change the implementation. If sudo is really needed, it is quite important implementation detail.

Next time when we find a regression, for example, command was run without sudo, the tests tell us that the problem is not here, making it easier to diagnose  the problem.
Line 50: 
Line 51:     def testHideValue(self):
Line 52:         self.assertEqual(iscsiadm._runCmd(['-v', 'a', 'b'], hideValue=True),
Line 53:                          misc.execCmd.result)


-- 
To view, visit http://gerrit.ovirt.org/19856
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I9ed21408c7b496c384053ce02cdb66d47df9a14b
Gerrit-PatchSet: 10
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Daniel Erez <derez at redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi at redhat.com>
Gerrit-Reviewer: Sergey Gotliv <sgotliv at redhat.com>
Gerrit-Reviewer: Vered Volansky <vvolansk at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list