Dan Kenigsberg has uploaded a new change for review.
Change subject: test CommandPath ......................................................................
test CommandPath
Change-Id: I0b53d5ce56551fea8c6ecf7801ca2de86334cf49 Signed-off-by: Dan Kenigsberg danken@redhat.com --- M tests/utilsTests.py 1 file changed, 18 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/65/11165/1
diff --git a/tests/utilsTests.py b/tests/utilsTests.py index cb32c65..dcc78ed 100644 --- a/tests/utilsTests.py +++ b/tests/utilsTests.py @@ -1,5 +1,5 @@ # -# Copyright 2012 Red Hat, Inc. +# Copyright 2012-2013 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -17,6 +17,8 @@ # # Refer to the README and COPYING files for full details of the license # +import errno + from testrunner import VdsmTestCase as TestCaseBase from vdsm import utils from storage import misc @@ -58,3 +60,18 @@ self.assertEquals(name, args[0]) sproc.kill() sproc.wait() + + +class CommandPathTests(TestCaseBase): + def testExisting(self): + cp = utils.CommandPath('sh', 'utter nonsense', '/bin/sh') + self.assertEquals(cp.cmd, '/bin/sh') + + def testMissing(self): + NAME = 'nonsense' + try: + utils.CommandPath(NAME, 'utter nonsense').cmd + except OSError as e: + self.assertEquals(e.errno, errno.ENOENT) + self.assertTrue(NAME in e.strerror, + msg='%s not in %s' % (NAME, e.strerror))
-- To view, visit http://gerrit.ovirt.org/11165 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange Gerrit-Change-Id: I0b53d5ce56551fea8c6ecf7801ca2de86334cf49 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Dan Kenigsberg danken@redhat.com
oVirt Jenkins CI Server has posted comments on this change.
Change subject: test CommandPath ......................................................................
Patch Set 1:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/809/ (2/2)
-- To view, visit http://gerrit.ovirt.org/11165 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I0b53d5ce56551fea8c6ecf7801ca2de86334cf49 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: test CommandPath ......................................................................
Patch Set 1:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/774/ (1/2)
-- To view, visit http://gerrit.ovirt.org/11165 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I0b53d5ce56551fea8c6ecf7801ca2de86334cf49 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: test CommandPath ......................................................................
Patch Set 1:
Build Successful
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/774/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/809/ : SUCCESS
-- To view, visit http://gerrit.ovirt.org/11165 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I0b53d5ce56551fea8c6ecf7801ca2de86334cf49 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
Zhou Zheng Sheng has posted comments on this change.
Change subject: test CommandPath ......................................................................
Patch Set 1: Looks good to me, but someone else must approve
-- To view, visit http://gerrit.ovirt.org/11165 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I0b53d5ce56551fea8c6ecf7801ca2de86334cf49 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Yaniv Bronhaim ybronhei@redhat.com Gerrit-Reviewer: Yeela Kaplan ykaplan@redhat.com Gerrit-Reviewer: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Antoni Segura Puimedon has posted comments on this change.
Change subject: test CommandPath ......................................................................
Patch Set 1: Looks good to me, but someone else must approve
-- To view, visit http://gerrit.ovirt.org/11165 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I0b53d5ce56551fea8c6ecf7801ca2de86334cf49 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Yaniv Bronhaim ybronhei@redhat.com Gerrit-Reviewer: Yeela Kaplan ykaplan@redhat.com Gerrit-Reviewer: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Dan Kenigsberg has posted comments on this change.
Change subject: test CommandPath ......................................................................
Patch Set 1: Verified; Looks good to me, approved
thanks for the reviews.
-- To view, visit http://gerrit.ovirt.org/11165 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I0b53d5ce56551fea8c6ecf7801ca2de86334cf49 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Yaniv Bronhaim ybronhei@redhat.com Gerrit-Reviewer: Yeela Kaplan ykaplan@redhat.com Gerrit-Reviewer: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Dan Kenigsberg has submitted this change and it was merged.
Change subject: test CommandPath ......................................................................
test CommandPath
Change-Id: I0b53d5ce56551fea8c6ecf7801ca2de86334cf49 Signed-off-by: Dan Kenigsberg danken@redhat.com --- M tests/utilsTests.py 1 file changed, 18 insertions(+), 1 deletion(-)
Approvals: Antoni Segura Puimedon: Looks good to me, but someone else must approve Dan Kenigsberg: Verified; Looks good to me, approved Zhou Zheng Sheng: Looks good to me, but someone else must approve
-- To view, visit http://gerrit.ovirt.org/11165 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged Gerrit-Change-Id: I0b53d5ce56551fea8c6ecf7801ca2de86334cf49 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Yaniv Bronhaim ybronhei@redhat.com Gerrit-Reviewer: Yeela Kaplan ykaplan@redhat.com Gerrit-Reviewer: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
vdsm-patches@lists.fedorahosted.org