New function for error log
Hi. I'm continuing to improve my small nagios plugin for Zope. I started to include error messages in the sensor. Therefore I was missing a way to get error messages out of the error log to signal nagios that everything is fine. I have a working patch attached (it references an image that is ready to be added as well). Due to the fact that this is a feature and the code provides no unit test infrastructure (and I don't have the time to start doing that for the error log) I'd like to know what the general rule for Zope 2 is, If I want to make improvements to existing code that isn't covered by unit tests at all. I'd check this in to the svn trunk if you like. Cheers, Christian -- Christian Theune <ct@gocept.com> gocept gmbh & co. kg
Due to the fact that this is a feature and the code provides no unit test infrastructure (and I don't have the time to start doing that for the error log) I'd like to know what the general rule for Zope 2 is, If I want to make improvements to existing code that isn't covered by unit tests at all.
That's an interesting question. What is the unit test policy if I change/improve a part of the Zope code that has no unit tests at all. Would I be expected to create unit tests for the whole thing all of a sudden? I'm interested in seeing this patch in the core myself. jens
On Sat, 2004-08-28 at 11:35, Jens Vagelpohl wrote:
Due to the fact that this is a feature and the code provides no unit test infrastructure (and I don't have the time to start doing that for the error log) I'd like to know what the general rule for Zope 2 is, If I want to make improvements to existing code that isn't covered by unit tests at all.
That's an interesting question. What is the unit test policy if I change/improve a part of the Zope code that has no unit tests at all. Would I be expected to create unit tests for the whole thing all of a sudden?
In another post Tres' likened doing so to "supererogation" (http://www.iep.utm.edu/s/superero.htm) which I think means to imply that doing so will get you points in programmer heaven (well, depending on your programmer dogma I suppose) but isn't strictly required. I try to create at least *one* unit test for something that isn't tested at all if I add a feature to it, testing my feature. ;-) At least then it gives people somewhere else to start. - C
That's an interesting question. What is the unit test policy if I change/improve a part of the Zope code that has no unit tests at all. Would I be expected to create unit tests for the whole thing all of a sudden?
In another post Tres' likened doing so to "supererogation" (http://www.iep.utm.edu/s/superero.htm) which I think means to imply that doing so will get you points in programmer heaven (well, depending on your programmer dogma I suppose) but isn't strictly required.
I try to create at least *one* unit test for something that isn't tested at all if I add a feature to it, testing my feature. ;-) At least then it gives people somewhere else to start.
OK, I "supererogated" and checked in a few unit tests ;) jens
On Aug 28, 2004, at 16:21, Christian Theune wrote:
Hi.
I'm continuing to improve my small nagios plugin for Zope. I started to include error messages in the sensor. Therefore I was missing a way to get error messages out of the error log to signal nagios that everything is fine. I have a working patch attached (it references an image that is ready to be added as well).
Due to the fact that this is a feature and the code provides no unit test infrastructure (and I don't have the time to start doing that for the error log) I'd like to know what the general rule for Zope 2 is, If I want to make improvements to existing code that isn't covered by unit tests at all.
I'd check this in to the svn trunk if you like.
I just put in the missing unit test infrastructure. Go ahead and check in your patch and add a unit test ;) I checked the tests into the 2_7-branch as well, only because the tests were easy to backport and more tests is always a good idea. The feature should only go in the trunk, though. jens
Hi. Am So, den 29.08.2004 schrieb Jens Vagelpohl um 15:29:
Due to the fact that this is a feature and the code provides no unit test infrastructure (and I don't have the time to start doing that for the error log) I'd like to know what the general rule for Zope 2 is, If I want to make improvements to existing code that isn't covered by unit tests at all.
I'd check this in to the svn trunk if you like.
I just put in the missing unit test infrastructure. Go ahead and check in your patch and add a unit test ;)
Waaah. I already did that here. :) Going to resolve conflicts ... :)
I checked the tests into the 2_7-branch as well, only because the tests were easy to backport and more tests is always a good idea. The feature should only go in the trunk, though.
Ack. Stuff is on it's way. Theuni -- Christian Theune <ct@gocept.com> gocept gmbh & co. kg
On Aug 29, 2004, at 16:03, Christian Theune wrote:
Am So, den 29.08.2004 schrieb Christian Theune um 15:37:
Ack. Stuff is on it's way.
Done. The error log improvement is there. Thanks for the quick support.
You published your nagios scripts somewhere, right? I'm interested. jens
Hi, Am So, den 29.08.2004 schrieb Jens Vagelpohl um 16:43:
Done. The error log improvement is there. Thanks for the quick support.
You published your nagios scripts somewhere, right? I'm interested.
See http://cvs.gocept.com -> ZNagios. I just saw that the error log integration has a bug (it displays one error in the status line, but doesn't set the status to an error level. I'll fix that immediately.) Christian -- Christian Theune <ct@gocept.com> gocept gmbh & co. kg
participants (3)
-
Chris McDonough -
Christian Theune -
Jens Vagelpohl