summaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorMarkus Roberts <Markus@reality.com>2010-06-09 17:47:39 -0700
committertest branch <puppet-dev@googlegroups.com>2010-02-17 06:50:53 -0800
commit2396ebac9021eaa4a2983e60902c04cc9e0db0ee (patch)
tree05015dc5d67aca35dd235a6229fb360ecb6b68e9 /spec
parent8128311690a25d864087a7aee31b233a459345fd (diff)
Use the 'root' feature rather than directly checking the uid
Jesse fixed all these but David and others moved them and introduced some more so...
Diffstat (limited to 'spec')
-rwxr-xr-xspec/unit/indirector/ldap.rb2
-rwxr-xr-xspec/unit/type/file/source.rb4
2 files changed, 3 insertions, 3 deletions
diff --git a/spec/unit/indirector/ldap.rb b/spec/unit/indirector/ldap.rb
index 2c4060c4d..44df2b5bb 100755
--- a/spec/unit/indirector/ldap.rb
+++ b/spec/unit/indirector/ldap.rb
@@ -136,7 +136,7 @@ describe Puppet::Indirector::Ldap do
end
describe "when reconnecting to ldap" do
- confine "Not running on culain as root" => (Puppet::Util::SUIDManager.uid == 0 and Facter.value("hostname") == "culain")
+ confine "Not running on culain as root" => (Puppet.features.root? and Facter.value("hostname") == "culain")
it "should reconnect to ldap when connections are lost"
end
diff --git a/spec/unit/type/file/source.rb b/spec/unit/type/file/source.rb
index b9bb22240..536cb63b0 100755
--- a/spec/unit/type/file/source.rb
+++ b/spec/unit/type/file/source.rb
@@ -148,7 +148,7 @@ describe Puppet::Type.type(:file).attrclass(:source) do
end
it "should copy the metadata's owner, group, checksum, and mode to the resource if they are not set on the resource" do
- Puppet::Util::SUIDManager.expects(:uid).returns 0
+ Puppet.features.expects(:root?).returns true
@source.copy_source_values
@@ -176,7 +176,7 @@ describe Puppet::Type.type(:file).attrclass(:source) do
describe "and puppet is not running as root" do
it "should not try to set the owner" do
- Puppet::Util::SUIDManager.expects(:uid).returns 100
+ Puppet.features.expects(:root?).returns false
@source.copy_source_values
@resource[:owner].should be_nil