Issue #1762 has been updated by luke.
It'd be great if you could -- the only service tests are in test/, which suck
and aren't usually sufficient.
The ideal provider tests would test that a given method results in a given
command being run. E.g., test that the 'status' method results in
'execute(:launchctl, "list", <name>)'.
In fact, in looking at your code.... It could be both simplified and made
better if you generally didn't call 'execute' yourself - the 'status' method
could just be:
<pre>
begin
launchctl "list", resource[:name]
return :running
rescue Puppet::ExecutionFailure
return :stopped
end
</pre>
The 'commands' method creates this 'launchctl' method for you, and it basically
does what you're doing with the 'execute' method. Then your test can just test
that 'launchctl' is called with the appropriate arguments.
----------------------------------------
Feature #1762: launchd service provider
http://projects.reductivelabs.com/issues/show/1762
Author: nigelk2
Status: Closed
Priority: Normal
Assigned to: community
Category: OSX
Target version: 0.24.7
Complexity: Unknown
Affected version: 0.24.6
Keywords:
Here is the launchd service provider.
I don't have autorequire working at this stage, but it's something I'll work on
in the future.
Patch/doc is pretty self-descriptive.
patched against 0.24.x but it's just a whole new file.
----------------------------------------
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://reductivelabs.com/redmine/my/account
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Puppet Bugs" 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-bugs?hl=en
-~----------~----~----~----~------~----~------~--~---