HomePhorge

Fix failing SSL Host test introduced by b6a67edc
ae74c6812864Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

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:

  1. 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

  1. ./lib/puppet/indirector/ssl_file.rb:95:in `save'
  2. ./lib/puppet/indirector/key/file.rb:34:in `save'
  3. ./lib/puppet/indirector/indirection.rb:265:in `save'
  4. ./lib/puppet/ssl/host.rb:147:in `generate_key'
  5. ./lib/puppet/ssl/host.rb:176:in `certificate'
  6. ./lib/puppet/ssl/host.rb:32:in `localhost'
  7. ./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>

Details

Provenance
Brice Figureau <brice-puppet@daysofwonder.com>Authored on
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPU759547511364: Fix device.conf error reporting
Branches
Unknown
Tags
Unknown

Event Timeline

Brice Figureau <brice-puppet@daysofwonder.com> committed rPUae74c6812864: Fix failing SSL Host test introduced by b6a67edc (authored by Brice Figureau <brice-puppet@daysofwonder.com>).Sep 17 2011, 3:29 PM