diff options
author | Josh Cooper <josh@puppetlabs.com> | 2011-08-19 14:03:56 -0700 |
---|---|---|
committer | Josh Cooper <josh@puppetlabs.com> | 2011-08-19 14:03:56 -0700 |
commit | 384302af6dec8c51442f2f29a4c7c555379cd297 (patch) | |
tree | 27680b19648100058c752e5fa4136a88a73d7a4f /spec/unit/ssl/host_spec.rb | |
parent | 71e190bf255f98e900f7ddd55db393d448df3274 (diff) | |
parent | 2091cbeade9d69a18689609f407f9d7f0304dc04 (diff) | |
download | puppet-384302af6dec8c51442f2f29a4c7c555379cd297.tar.gz puppet-384302af6dec8c51442f2f29a4c7c555379cd297.tar.xz puppet-384302af6dec8c51442f2f29a4c7c555379cd297.zip |
Merge branch 'backport-windows-work-to-2.7' into 2.7.x
* backport-windows-work-to-2.7: (60 commits)
maint: Fix build break due to recent merge from 2.7.x to master
Fix posix exec provider spec failures on Windows
(#5495) Remove dead Windows-specific code from posix exec provider
Stop trying to make config directories in Windows specs
(#8272) Add missing tests for Windows service provider methods.
(#8409) Add a default group provider for Windows
(#8408) Add a default user provider for Windows
(#8408/8409) Add a Windows ADSI helper module
(#8663) Exclude exec timeout test on Windows
(#8663) Exclude git rev-parse HEAD spec test on Windows
Check for the appropriate permissions in File type tests on Windows
Remove :fails_on_windows from file type tests that no longer fail on Windows
Disable file bucket diffing tests on Windows
Always put a slash between the checksum and path in filebucket URLs
Treat Windows absolute paths as absolute paths
Consolidate test logic determining if a registered file is in the temp directory
Clarify logic and error messages when initializing Puppet::FileBucket::File
Disable symlink related file tests on Windows
(#8644) Host provider on Windows
(#8660) Fix destdir option on Windows
...
Diffstat (limited to 'spec/unit/ssl/host_spec.rb')
-rwxr-xr-x | spec/unit/ssl/host_spec.rb | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/spec/unit/ssl/host_spec.rb b/spec/unit/ssl/host_spec.rb index c2d9690e6..226acdecd 100755 --- a/spec/unit/ssl/host_spec.rb +++ b/spec/unit/ssl/host_spec.rb @@ -5,15 +5,24 @@ require 'puppet/ssl/host' require 'puppet/sslcertificates' require 'puppet/sslcertificates/ca' -describe Puppet::SSL::Host do +# REMIND: Fails on windows because there is no user provider yet +describe Puppet::SSL::Host, :fails_on_windows => true do + include PuppetSpec::Files + before do Puppet::SSL::Host.indirection.terminus_class = :file + + # Get a safe temporary file + dir = tmpdir("ssl_host_testing") + Puppet.settings[:confdir] = dir + Puppet.settings[:vardir] = dir + @host = Puppet::SSL::Host.new("myname") end after do # Cleaned out any cached localhost instance. - Puppet::Util::Cacher.expire + Puppet::SSL::Host.instance_variable_set(:@localhost, nil) Puppet::SSL::Host.ca_location = :none end @@ -82,16 +91,6 @@ describe Puppet::SSL::Host do Puppet::SSL::Host.localhost.should == Puppet::SSL::Host.localhost end - it "should be able to expire the cached instance" do - one = stub 'host1', :certificate => "eh", :key => 'foo' - two = stub 'host2', :certificate => "eh", :key => 'foo' - Puppet::SSL::Host.expects(:new).times(2).returns(one).then.returns(two) - - Puppet::SSL::Host.localhost.should equal(one) - Puppet::Util::Cacher.expire - Puppet::SSL::Host.localhost.should equal(two) - end - it "should be able to verify its certificate matches its key" do Puppet::SSL::Host.new("foo").should respond_to(:certificate_matches_key?) end @@ -711,7 +710,7 @@ describe Puppet::SSL::Host do end end - describe "when handling PSON" do + describe "when handling PSON", :unless => Puppet.features.microsoft_windows? do include PuppetSpec::Files before do |