summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rwxr-xr-xtest/other/events.rb27
1 files changed, 27 insertions, 0 deletions
diff --git a/test/other/events.rb b/test/other/events.rb
index a8779743b..4bfb73090 100755
--- a/test/other/events.rb
+++ b/test/other/events.rb
@@ -100,4 +100,31 @@ class TestEvents < Test::Unit::TestCase
assert(FileTest.exists?(fname), "#{fname} does not exist")
#assert_equal(events.length, trans.triggered?(objects[:b], :refresh))
end
+
+ def test_multiplerefreshes
+ files = []
+
+ 4.times { |i|
+ files << Puppet.type(:file).create(
+ :name => tempfile(),
+ :ensure => "file"
+ )
+ }
+
+ fname = tempfile()
+ exec = Puppet.type(:exec).create(
+ :name => "touch %s" % fname,
+ :path => "/usr/bin:/bin",
+ :refreshonly => true
+ )
+
+ exec[:subscribe] = files.collect { |f|
+ ["file", f.name]
+ }
+
+ comp = newcomp(exec, *files)
+
+ assert_apply(comp)
+ assert(FileTest.exists?(fname), "Exec file did not get created")
+ end
end