summaryrefslogtreecommitdiffstats
path: root/test/ral
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 /test/ral
parent8128311690a25d864087a7aee31b233a459345fd (diff)
downloadpuppet-2396ebac9021eaa4a2983e60902c04cc9e0db0ee.tar.gz
puppet-2396ebac9021eaa4a2983e60902c04cc9e0db0ee.tar.xz
puppet-2396ebac9021eaa4a2983e60902c04cc9e0db0ee.zip
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 'test/ral')
-rwxr-xr-xtest/ral/providers/group.rb2
-rwxr-xr-xtest/ral/providers/user.rb2
-rwxr-xr-xtest/ral/type/exec.rb2
-rwxr-xr-xtest/ral/type/file.rb2
4 files changed, 4 insertions, 4 deletions
diff --git a/test/ral/providers/group.rb b/test/ral/providers/group.rb
index 8e62d7b1e..cedbf137c 100755
--- a/test/ral/providers/group.rb
+++ b/test/ral/providers/group.rb
@@ -179,7 +179,7 @@ class TestGroupProvider < Test::Unit::TestCase
}
end
- if Puppet::Util::SUIDManager.uid == 0
+ if Puppet.features.root?
def test_mkgroup
gobj = nil
comp = nil
diff --git a/test/ral/providers/user.rb b/test/ral/providers/user.rb
index 03e3ec892..9abf850ad 100755
--- a/test/ral/providers/user.rb
+++ b/test/ral/providers/user.rb
@@ -418,7 +418,7 @@ class TestUserProvider < Test::Unit::TestCase
assert_equal(main.sort, list.sort, "Group list is not equal")
end
- if Puppet::Util::SUIDManager.uid == 0
+ if Puppet.features.root?
def test_simpleuser
name = "pptest"
diff --git a/test/ral/type/exec.rb b/test/ral/type/exec.rb
index 27a3de4d1..98d111444 100755
--- a/test/ral/type/exec.rb
+++ b/test/ral/type/exec.rb
@@ -294,7 +294,7 @@ class TestExec < Test::Unit::TestCase
assert_events([:executed_command], comp)
end
- if Puppet::Util::SUIDManager.uid == 0
+ if Puppet.features.root?
# Verify that we can execute commands as a special user
def mknverify(file, user, group = nil, id = true)
File.umask(0022)
diff --git a/test/ral/type/file.rb b/test/ral/type/file.rb
index 462e8f8eb..431a302ab 100755
--- a/test/ral/type/file.rb
+++ b/test/ral/type/file.rb
@@ -109,7 +109,7 @@ class TestFile < Test::Unit::TestCase
end
end
- if Puppet::Util::SUIDManager.uid == 0
+ if Puppet.features.root?
def test_createasuser
dir = tmpdir()