diff options
author | David Schmitt <david@schmitt.edv-bus.at> | 2007-11-10 19:24:49 +0100 |
---|---|---|
committer | David Schmitt <david@schmitt.edv-bus.at> | 2007-11-10 19:39:24 +0100 |
commit | 8fe892db28206924e6baacbcca2d709dbd80ad49 (patch) | |
tree | df712f21d6ac14cb33ee7e9bc3bf1271fd0096f9 | |
parent | 3f583dc133ce50ae34bfc151474c6d4196f803ca (diff) | |
download | puppet-8fe892db28206924e6baacbcca2d709dbd80ad49.tar.gz puppet-8fe892db28206924e6baacbcca2d709dbd80ad49.tar.xz puppet-8fe892db28206924e6baacbcca2d709dbd80ad49.zip |
fix a testfailure when running spec tests as root
when running as root, examples trying to create directories
with non-standard users failed. This fix evades this difficulty.
-rwxr-xr-x | spec/unit/util/settings.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/spec/unit/util/settings.rb b/spec/unit/util/settings.rb index e647ce1cd..620c04009 100755 --- a/spec/unit/util/settings.rb +++ b/spec/unit/util/settings.rb @@ -392,6 +392,7 @@ describe Puppet::Util::Settings, " when being used to manage the host machine" d @settings = Puppet::Util::Settings.new @settings.setdefaults :main, :maindir => ["/maindir", "a"], :seconddir => ["/seconddir", "a"] @settings.setdefaults :other, :otherdir => {:default => "/otherdir", :desc => "a", :owner => "luke", :group => "johnny", :mode => 0755} + @settings.setdefaults :third, :thirddir => ["/thirddir", "b"] @settings.setdefaults :files, :myfile => {:default => "/myfile", :desc => "a", :mode => 0755} end @@ -424,9 +425,9 @@ describe Puppet::Util::Settings, " when being used to manage the host machine" d it "should be able to create needed directories in multiple sections" do Dir.expects(:mkdir).with("/maindir") - Dir.expects(:mkdir).with("/otherdir", 0755) Dir.expects(:mkdir).with("/seconddir") - @settings.use(:main, :other) + Dir.expects(:mkdir).with("/thirddir") + @settings.use(:main, :third) end it "should provide a method to trigger enforcing of file modes on existing files and directories" do @@ -540,8 +541,8 @@ describe Puppet::Util::Settings, " when being used to manage the host machine" d end it "should support a method for re-using all currently used sections" do - Dir.expects(:mkdir).with(@settings[:otherdir], 0755).times(2) - @settings.use(:other) + Dir.expects(:mkdir).with("/thirddir").times(2) + @settings.use(:third) @settings.reuse end |