puppetlabs/puppet — pull request #1190 by jeffmccune (2012-09-26 20:52:55+00:00)
Title: (#7316) Do not set default values for confdir and vardir in the master

Without this patch applied `puppet master` will explicitly set the value
for confdir and vardir inside of Puppet::Application::Master#app_defaults.
This is a problem because it calls a method that does not exist while
trying to do so.

This patch fixes the problem by implementing the intended behavior
documented in #15337, and specifically in commit 38cba0a. This intended
behavior is:

1: If provided, use explicit puppet.conf in `--confdir`
2: If root, use system puppet.conf
3: Otherwise, use ~/.puppet/puppet.conf

(#7316) Add spec coverage for Puppet::Application::Master#app_defaults

Without this patch we don't have any spec test coverage for the
app_defaults instance method of the Puppet::Application::Master class.
This lack of coverage is problem because cherry picking the confdir and
vardir patch from PR-882 in commit b064ee63 appears to work just fine
after resolving the merge conflicts. Things were not fine, however,
because the app_defaults method makes a call that raises an exception and
none of our spec tests caught this issue.

The acceptance tests did, however, by exercising the command `puppet
master --configprint pidfile`