Title: Message Title
Ralph BOlton updated an issue
Puppet / PUP-2076
Unit Tests Fail if not run as root (continues http://projects.puppetlabs.com/issues/16248)
Change By:
Ralph BOlton
This follows on from Bug 16248 (http://projects.puppetlabs.com/issues/16248).It seems that running --noop and running unit tests with rspec-puppet both suffer the same problem - that is, that core Puppet tries to do things that only root can do. In the case of running --noop, I think the previous bug arrives at a reasonable conclusion - that is that --noop as a non-root user isn't especially appropriate because an ordinary user may not have access to the files and binaries that would be needed to even calculate what work needs to be done.However, rspec-puppet unit tests absolutely shouldn't need to be run as root. Since they really only test the catalogue, there should be very little need to do some of the things Puppet appears to do. It turns out that rspec-puppet's 'should compile' test always fails if you have a user specification in the manifest (see bug exploring this problem: https://github.com/rodjek/rspec-puppet/issues/175). This appears to be because puppet attempts to stat() (and maybe run) binaries such as /usr/sbin/usermod, even when just building up the catalogue in the test environment Clearly, this is unnecessary when checking against a unit test spec.What can we do about this? It seems unlikely that rspec-puppet can resolve this problem without some movement in Puppet itself.
Add Comment
This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede)
--
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group