summaryrefslogtreecommitdiffstats
path: root/spec/unit/util
diff options
context:
space:
mode:
authorJosh Cooper <josh@puppetlabs.com>2011-08-17 17:08:38 -0700
committerJacob Helwig <jacob@puppetlabs.com>2011-08-19 13:52:59 -0700
commit2091cbeade9d69a18689609f407f9d7f0304dc04 (patch)
tree27680b19648100058c752e5fa4136a88a73d7a4f /spec/unit/util
parent2681ca5360428db071aaa66614c21f6be581c1cc (diff)
downloadpuppet-2091cbeade9d69a18689609f407f9d7f0304dc04.tar.gz
puppet-2091cbeade9d69a18689609f407f9d7f0304dc04.tar.xz
puppet-2091cbeade9d69a18689609f407f9d7f0304dc04.zip
maint: Fix build break due to recent merge from 2.7.x to master
The resource_spec was failing because /etc is not considered a fully-qualified path on Windows. Using File.expand_path fixes that. The suidmanager_spec was failing because we weren't stubbing the microsoft_windows feature, so SUIDManager.asuser was a no-op when running as root, and our expectations weren't being met. (cherry picked from commit af87f32a016a5ed48353f516f9558f95c54c50b4)
Diffstat (limited to 'spec/unit/util')
-rwxr-xr-xspec/unit/util/suidmanager_spec.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/spec/unit/util/suidmanager_spec.rb b/spec/unit/util/suidmanager_spec.rb
index fc70e1718..abfe3f723 100755
--- a/spec/unit/util/suidmanager_spec.rb
+++ b/spec/unit/util/suidmanager_spec.rb
@@ -33,6 +33,7 @@ describe Puppet::Util::SUIDManager do
describe "#asuser" do
it "should set euid/egid when root" do
Process.stubs(:uid).returns(0)
+ Puppet.features.stubs(:microsoft_windows?).returns(false)
Process.stubs(:egid).returns(51)
Process.stubs(:euid).returns(50)
@@ -168,6 +169,8 @@ describe Puppet::Util::SUIDManager do
describe "with #system" do
it "should set euid/egid when root" do
Process.stubs(:uid).returns(0)
+ Puppet.features.stubs(:microsoft_windows?).returns(false)
+
Process.stubs(:egid).returns(51)
Process.stubs(:euid).returns(50)