diff options
| author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-04-05 23:38:33 +0000 |
|---|---|---|
| committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-04-05 23:38:33 +0000 |
| commit | fcce8203fdb77c7135fd1fcae9a0e45c9b6073c3 (patch) | |
| tree | 959e48c29e8200e8444b8435eb612744e0b1e92a /test | |
| parent | 37a4a555429e195079ee6d301948c75b85048996 (diff) | |
| download | puppet-fcce8203fdb77c7135fd1fcae9a0e45c9b6073c3.tar.gz puppet-fcce8203fdb77c7135fd1fcae9a0e45c9b6073c3.tar.xz puppet-fcce8203fdb77c7135fd1fcae9a0e45c9b6073c3.zip | |
Okay, last one, hopefully. Modifying checks to support arrays.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1089 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'test')
| -rwxr-xr-x | test/types/exec.rb | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/test/types/exec.rb b/test/types/exec.rb index adc50054a..f9f7592e3 100755 --- a/test/types/exec.rb +++ b/test/types/exec.rb @@ -489,6 +489,47 @@ class TestExec < Test::Unit::TestCase assert(FileTest.exists?(file)) end + + def test_checkarrays + exec = nil + file = tempfile() + + test = "test -f #{file}" + + assert_nothing_raised { + exec = Puppet.type(:exec).create( + :path => ENV["PATH"], + :command => "touch #{file}" + ) + } + + assert_nothing_raised { + exec[:unless] = test + } + + assert_nothing_raised { + assert(exec.check, "Check did not pass") + } + + assert_nothing_raised { + exec[:unless] = [test, test] + } + + + assert_nothing_raised { + exec.finish + } + + assert_nothing_raised { + assert(exec.check, "Check did not pass") + } + + assert_apply(exec) + + assert_nothing_raised { + assert(! exec.check, "Check passed") + } + end end # $Id$ |
