diff options
| author | Markus Roberts <Markus@reality.com> | 2010-06-09 17:47:39 -0700 |
|---|---|---|
| committer | test branch <puppet-dev@googlegroups.com> | 2010-02-17 06:50:53 -0800 |
| commit | 2396ebac9021eaa4a2983e60902c04cc9e0db0ee (patch) | |
| tree | 05015dc5d67aca35dd235a6229fb360ecb6b68e9 /spec | |
| parent | 8128311690a25d864087a7aee31b233a459345fd (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-x | spec/unit/indirector/ldap.rb | 2 | ||||
| -rwxr-xr-x | spec/unit/type/file/source.rb | 4 |
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 |
