On Jun 3, 2008, at 7:48 PM, AJ wrote:

>
> 'lo, chaps!
>
> I've written some code[1] to fix #1200[2] and some other similar bugs
> (#1190) relating to exiting in daemon mode when they shouldn't.
>
> I notice that there aren't any unit tests or specifications for the
> executables (just tests to see if daemonisation works, or something),
> and James bounced the ticket back to me requesting tests, as such; I
> turn to you! the collective developers!
>
> How should I spec the executables?
>
> If speccing the executables is not applicable, should this  
> functionality
> be refactored OUT of the puppetd binary into initialisation classes?


It's really tough to test the executables as they're written, because  
there's a lot of code in a file that's supposed to be exec'ed, rather  
than loaded like a library.

If you look in master, you'll see that I've started to pull a lot more  
code out of the executables (e.g., look at puppetca), but I haven't  
done all of them.

In general, I'd say that you should refactor what you can, test  
whatever else you can that's left, and then, um, do your best to make  
sure it works.

-- 
It is better to sleep on things beforehand than lie awake about them
afterward. -- Baltasar Gracian
---------------------------------------------------------------------
Luke Kanies | http://reductivelabs.com | http://madstop.com


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to