Change in vdsm[master]: monitor: Convert valid to read-only property

nsoffer at redhat.com nsoffer at redhat.com
Wed Apr 27 10:36:32 UTC 2016


Nir Soffer has posted comments on this change.

Change subject: monitor: Convert valid to read-only property
......................................................................


Patch Set 3:

(2 comments)

https://gerrit.ovirt.org/#/c/39088/3/tests/storageMonitorTests.py
File tests/storageMonitorTests.py:

Line 41:     def test_deleting_attribute_raises(self):
Line 42:         for name in self.status.__slots__:
Line 43:             self.assertRaises(AssertionError, delattr, self.frozen, name)
Line 44: 
Line 45:     def test_valid(self):
> I don't see how this test is needed, the FrozenStatusTests is about making 
valid is a property, so copying values is not related. This verify that it works for frozen status, so if we change frozen status implementation, we know we did not broke it.
Line 46:         self.assertTrue(self.frozen.valid)
Line 47: 
Line 48: 
Line 49: class StatusValidTests(VdsmTestCase):


Line 49: class StatusValidTests(VdsmTestCase):
Line 50: 
Line 51:     def test_valid(self):
Line 52:         s = monitor.Status()
Line 53:         self.assertTrue(s.valid)
> lets add assertion that verifies that error is None
OK
Line 54: 
Line 55:     def test_invalid(self):
Line 56:         s = monitor.Status()
Line 57:         s.error = Exception()


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Iff27081041bbaa1e319539df67abb31f38367e7d
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Ala Hino <ahino at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Freddy Rolland <frolland at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Jenkins CI RO
Gerrit-Reviewer: Liron Aravot <laravot 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