summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDavid Schmitt <david@schmitt.edv-bus.at>2007-11-11 09:45:54 +0100
committerDavid Schmitt <david@schmitt.edv-bus.at>2007-11-11 09:54:18 +0100
commitd48ee3e0f61bad913b4c050e9542b409fdd27e43 (patch)
tree7c723361805ac001d2096c1794ddfb5243a4ffcd /test
parent3f583dc133ce50ae34bfc151474c6d4196f803ca (diff)
downloadpuppet-d48ee3e0f61bad913b4c050e9542b409fdd27e43.tar.gz
puppet-d48ee3e0f61bad913b4c050e9542b409fdd27e43.tar.xz
puppet-d48ee3e0f61bad913b4c050e9542b409fdd27e43.zip
fix crontests depending on ENV[USER] by using Etc.getpwuid(Process.uid) instead
Diffstat (limited to 'test')
-rwxr-xr-xtest/ral/types/cron.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/ral/types/cron.rb b/test/ral/types/cron.rb
index a9a00240c..ca60477ed 100755
--- a/test/ral/types/cron.rb
+++ b/test/ral/types/cron.rb
@@ -464,9 +464,9 @@ class TestCron < Test::Unit::TestCase
inst = @crontype.create(
:name => "something", :command => "/some/thing",
:provider => :crontab)
- assert_equal(ENV["USER"], inst.should(:user),
+ assert_equal(Etc.getpwuid(Process.uid).name, inst.should(:user),
"user did not default to current user with crontab")
- assert_equal(ENV["USER"], inst.should(:target),
+ assert_equal(Etc.getpwuid(Process.uid).name, inst.should(:target),
"target did not default to current user with crontab")
# Now make a new cron with a user, and make sure it gets copied