summaryrefslogtreecommitdiffstats
path: root/spec/unit/util
diff options
context:
space:
mode:
authorJosh Cooper <josh@puppetlabs.com>2011-07-27 15:59:10 -0700
committerJosh Cooper <josh@puppetlabs.com>2011-07-27 15:59:10 -0700
commit0668c5e4ef080c5dd7e37f35b72b484ca6574fdb (patch)
tree75c6acb3bd90de43e5d7fbfb519c28333e281fc0 /spec/unit/util
parente6fb1480eb2d6271dd05e11ab6cff70c70414c6f (diff)
parente0d3f11fc7b580aedec5350dc41a01417d6acd8d (diff)
Merge branch 'ticket/master/8663-windows-spec-tests'
* ticket/master/8663-windows-spec-tests: (#8663) Drive letters are not valid absolute paths on Windows (#8663) Update the run_mode spec test on Windows to match the code (#8663) The ssh_authorized_key type is not supported on Windows (#8663) Reenable spec tests on Windows that now pass
Diffstat (limited to 'spec/unit/util')
-rwxr-xr-xspec/unit/util/run_mode_spec.rb10
1 files changed, 7 insertions, 3 deletions
diff --git a/spec/unit/util/run_mode_spec.rb b/spec/unit/util/run_mode_spec.rb
index 883ee1206..5d9a3d058 100755
--- a/spec/unit/util/run_mode_spec.rb
+++ b/spec/unit/util/run_mode_spec.rb
@@ -1,14 +1,16 @@
#!/usr/bin/env rspec
require 'spec_helper'
-describe Puppet::Util::RunMode, :fails_on_windows => true do
+describe Puppet::Util::RunMode do
before do
@run_mode = Puppet::Util::RunMode.new('fake')
end
it "should have confdir /etc/puppet when run as root" do
Puppet.features.stubs(:root?).returns(true)
- @run_mode.conf_dir.should == '/etc/puppet'
+ etcdir = Puppet.features.microsoft_windows? ? File.join(Dir::WINDOWS, "puppet", "etc") : '/etc/puppet'
+ # REMIND: issue with windows backslashes
+ @run_mode.conf_dir.should == File.expand_path(etcdir)
end
it "should have confdir ~/.puppet when run as non-root" do
@@ -19,7 +21,9 @@ describe Puppet::Util::RunMode, :fails_on_windows => true do
it "should have vardir /var/lib/puppet when run as root" do
Puppet.features.stubs(:root?).returns(true)
- @run_mode.var_dir.should == '/var/lib/puppet'
+ vardir = Puppet.features.microsoft_windows? ? File.join(Dir::WINDOWS, "puppet", "var") : '/var/lib/puppet'
+ # REMIND: issue with windows backslashes
+ @run_mode.var_dir.should == File.expand_path(vardir)
end
it "should have vardir ~/.puppet/var when run as non-root" do