summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-05-19 18:31:20 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-05-19 18:31:20 +0000
commit69cf2fe278eb20b718663535bbae18965a1ece63 (patch)
tree794f5e9fb3e4fbf84f284bd9f16c64820eb13c7b /test
parent0381cc1280c2c4c16687f7537962e9e1f1186d85 (diff)
Adding a small fix to cron tabs; they will at least parse tabs that have env settings in them, although you still cannot, at this point, set them.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1216 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'test')
-rwxr-xr-xtest/types/cron.rb28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/types/cron.rb b/test/types/cron.rb
index 496274d88..22c2e98f9 100755
--- a/test/types/cron.rb
+++ b/test/types/cron.rb
@@ -422,6 +422,34 @@ class TestCron < Test::Unit::TestCase
end
end
end
+
+ # Make sure we don't puke on env settings
+ def test_envsettings
+ cron = mkcron("envtst")
+
+ assert_apply(cron)
+
+ obj = Puppet::Type::Cron.cronobj(@me)
+
+ assert(obj)
+
+ text = obj.read
+
+ text = "SHELL = /path/to/some/thing\n" + text
+
+ obj.write(text)
+
+ assert_nothing_raised {
+ cron.retrieve
+ }
+
+ cron[:command] = "/some/other/command"
+
+ assert_apply(cron)
+
+ assert(obj.read =~ /SHELL/, "lost env setting")
+
+ end
end
# $Id$