diff options
| author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-05-16 01:52:30 +0000 |
|---|---|---|
| committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-05-16 01:52:30 +0000 |
| commit | dc3a6d5a8a30047e3136786a8841869b7e35b422 (patch) | |
| tree | 609935676dc22e13519d1a5a716483c931aadbd3 /test | |
| parent | 373afa35710cf6a50f171341c569db5550026fbf (diff) | |
Making sure file recursion works for all valid inputs
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1204 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'test')
| -rw-r--r-- | test/types/file.rb | 49 |
1 files changed, 26 insertions, 23 deletions
diff --git a/test/types/file.rb b/test/types/file.rb index 18dedd02d..e3f01d306 100644 --- a/test/types/file.rb +++ b/test/types/file.rb @@ -489,36 +489,39 @@ class TestFile < Test::Unit::TestCase FileUtils.mkdir_p(subdir) dir = nil - assert_nothing_raised { - dir = Puppet.type(:file).create( - :path => basedir, - :recurse => true, - :check => %w{owner mode group} - ) - } - - assert_nothing_raised { - dir.evaluate - } + [true, "true", "inf", 50].each do |value| + assert_nothing_raised { + dir = Puppet.type(:file).create( + :path => basedir, + :recurse => value, + :check => %w{owner mode group} + ) + } - subobj = nil - assert_nothing_raised { - subobj = Puppet.type(:file)[subdir] - } + assert_nothing_raised { + dir.evaluate + } - assert(subobj, "Could not retrieve %s object" % subdir) + subobj = nil + assert_nothing_raised { + subobj = Puppet.type(:file)[subdir] + } - File.open(tmpfile, "w") { |f| f.puts "yayness" } + assert(subobj, "Could not retrieve %s object" % subdir) - dir.evaluate + File.open(tmpfile, "w") { |f| f.puts "yayness" } - file = nil - assert_nothing_raised { - file = Puppet.type(:file)[tmpfile] - } + dir.evaluate - assert(file, "Could not retrieve %s object" % tmpfile) + file = nil + assert_nothing_raised { + file = Puppet.type(:file)[tmpfile] + } + assert(file, "Could not retrieve %s object" % tmpfile) + #system("rm -rf %s" % basedir) + Puppet.type(:file).clear + end end =begin |
