puppetlabs/puppet — pull request #1704 by jpartlow (2013-06-11 23:32:06+00:00)
Title: Maint/agent logger specs on windows

Alright, have a variation of the test which accounts for the following on Windows:

* --daemonize flag exits
* --logdest=syslog is silently ignored
* no logger defaults to eventlog

There is a problem with the mocking approach in that expectation errors can be swallowed by Puppet::Application#run's exit_on_fail calls unless you explicitly uncomment Puppet::Util.exit_on_fail:511:512 (puts err info).

Would have preferred to remove the mocking of Puppet::Util::Log.newdestination in favor of just checking Puppet::Util::Log.destinations for created loggers, but bogged down with (I think issues) of the actual loggers initializing...actually could stub that. Last problem was DestFile NUL versus /dev/null issues on Windows...I think.