summaryrefslogtreecommitdiffstats
path: root/spec/integration
diff options
context:
space:
mode:
authorJosh Cooper <josh@puppetlabs.com>2011-07-18 23:40:17 -0700
committerJacob Helwig <jacob@puppetlabs.com>2011-08-19 13:48:29 -0700
commit5d3a40fda87b7346d99fd25c0eb1906a62c19512 (patch)
tree9dbdeda33b6e19cd26b0b3735694f26473d258e6 /spec/integration
parentce0c258ba24a5232a82a69eb62387893feca684e (diff)
downloadpuppet-5d3a40fda87b7346d99fd25c0eb1906a62c19512.tar.gz
puppet-5d3a40fda87b7346d99fd25c0eb1906a62c19512.tar.xz
puppet-5d3a40fda87b7346d99fd25c0eb1906a62c19512.zip
Maint: Fix miscellaneous tests
Several tests were broken due to pecularities of Windows and Ruby on Windows: * Ruby on windows does not differentiate between group and other file permissions. * All open file handles must be closed before the file can be deleted * Sometimes the current working directory (Dir.getwd) is reported as C:/foo and other times as C:\\foo, which confuses the spec tests. * Ruby's sprintf formats floating point values differently on Windows vs Unix. The Windows exponent has an extra leading zero. * Needed to stub execution of security command with the SMF service provider. Reviewed-by: Jacob Helwig <jacob@puppetlabs.com> (cherry picked from commit 0e4ae653c0628cb0df9ccace98bca4bc7478fb7c)
Diffstat (limited to 'spec/integration')
-rwxr-xr-xspec/integration/util/settings_spec.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/integration/util/settings_spec.rb b/spec/integration/util/settings_spec.rb
index b05c63107..46d783c4e 100755
--- a/spec/integration/util/settings_spec.rb
+++ b/spec/integration/util/settings_spec.rb
@@ -18,12 +18,12 @@ describe Puppet::Util::Settings do
File.should be_directory(settings[:maindir])
end
- it "should make its directories with the corret modes" do
+ it "should make its directories with the correct modes" do
settings = Puppet::Util::Settings.new
settings.setdefaults :main, minimal_default_settings.update( :maindir => {:default => tmpfile("main"), :desc => "a", :mode => 0750} )
settings.use(:main)
- (File.stat(settings[:maindir]).mode & 007777).should == 0750
+ (File.stat(settings[:maindir]).mode & 007777).should == (Puppet.features.microsoft_windows? ? 0755 : 0750)
end
end