diff options
| author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-10-09 17:52:22 +0000 |
|---|---|---|
| committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-10-09 17:52:22 +0000 |
| commit | 08900a409350acfb3bea62ea8470095eeae450da (patch) | |
| tree | 4d7b1e16505153d1c46fbf5e735ef85a4a1e797e /test | |
| parent | 133c17fa6665256cafdcd1cf76d2ae50233c44f4 (diff) | |
Fixing #298 - refreshonly now correctly deals with specified false values
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1751 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'test')
| -rwxr-xr-x | test/types/exec.rb | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/test/types/exec.rb b/test/types/exec.rb index c5decb80a..0f91f74a0 100755 --- a/test/types/exec.rb +++ b/test/types/exec.rb @@ -105,7 +105,7 @@ class TestExec < Test::Unit::TestCase assert_equal(wd,command.output.chomp) end - def test_refreshonly + def test_refreshonly_functional file = nil cmd = nil tmpfile = tempfile() @@ -166,6 +166,24 @@ class TestExec < Test::Unit::TestCase ) end + def test_refreshonly + cmd = true + assert_nothing_raised { + cmd = Puppet.type(:exec).create( + :command => "pwd", + :path => "/usr/bin:/bin:/usr/sbin:/sbin", + :refreshonly => true + ) + } + + # Checks should always fail when refreshonly is enabled + assert(!cmd.check, "Check passed with refreshonly true") + + # Now set it to false + cmd[:refreshonly] = false + assert(cmd.check, "Check failed with refreshonly false") + end + def test_creates file = tempfile() exec = nil |
