Fix failing SSL Host test introduced by b6a67edc
The fix for #7982 added a test that was failing when run as part
of the full suite:
- Puppet::SSL::Host should allow to reset localhost Failure/Error: previous_host = Puppet::SSL::Host.localhost Puppet::Error: Cannot save maynard.lan; parent directory /var/folders/hq/
hhqxfhws68bc_s23f2ktyx0m0000gp/T/ssl_host_testing20110914-2703-fzokxv-0/
ssl/private_keys does not exist
- ./lib/puppet/indirector/ssl_file.rb:95:in `save'
- ./lib/puppet/indirector/key/file.rb:34:in `save'
- ./lib/puppet/indirector/indirection.rb:265:in `save'
- ./lib/puppet/ssl/host.rb:147:in `generate_key'
- ./lib/puppet/ssl/host.rb:176:in `certificate'
- ./lib/puppet/ssl/host.rb:32:in `localhost'
- ./spec/unit/ssl/host_spec.rb:69
This is because during the ssl_file terminus initialization in
ca_spec the vardir and ssldir directories are created through the
use of Puppet.settings.use. Unfortunately those "use" are reset after
each test but not the fact that the terminus was initialized.
Thus when running the host_spec tests, no "implicit" Puppet.settings.use
are run when the terminus is first accessed.
The fix is to add an explicit Puppet.settings.use to those tests.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>