Change in vdsm[master]: response: Add support for specific error checking in is_error

fromani at redhat.com fromani at redhat.com
Thu Feb 25 15:06:55 UTC 2016


Francesco Romani has posted comments on this change.

Change subject: response: Add support for specific error checking in is_error
......................................................................


Patch Set 1: Code-Review+1

(1 comment)

nice! let's just improve a bit the tests and it is fine. Partial ACK

https://gerrit.ovirt.org/#/c/54036/1/tests/responseTests.py
File tests/responseTests.py:

Line 74:             self.assertEqual(res[key], args[key])
Line 75: 
Line 76:     def test_is_error(self):
Line 77:         NAME = 'noVM'  # no special meaning, any error is fine
Line 78:         NAME2 = 'hookError'
let's add a specific testcase for this new code path

@permutations([
  # err_name
  ['noVM'],
  ['hookError'],
])
def test_is_specific_error(self, err_name):
   self.assertTrue(response.is_error(response.error(err_name), err_name)
Line 79:         self.assertTrue(response.is_error(response.error(NAME)))
Line 80: 
Line 81:         self.assertTrue(response.is_error(response.error(NAME), err=NAME))
Line 82:         self.assertFalse(response.is_error(response.error(NAME), err=NAME2))


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I00d8d2914983f75293ece5ce05894ca3821b7b24
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Betak <mbetak at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list