From fe16f83a1b56f5d8644ee08585cc3086d4acc2a0 Mon Sep 17 00:00:00 2001 From: luke Date: Fri, 5 May 2006 19:47:15 +0000 Subject: making a test to verify that the functionality womble is looking for now works git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1179 980ebf18-57e1-0310-9a29-db15c13687c0 --- test/other/events.rb | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/test/other/events.rb b/test/other/events.rb index 4bfb73090..967fb9395 100755 --- a/test/other/events.rb +++ b/test/other/events.rb @@ -127,4 +127,33 @@ class TestEvents < Test::Unit::TestCase assert_apply(comp) assert(FileTest.exists?(fname), "Exec file did not get created") end + + def test_refreshordering + file = tempfile() + + exec1 = Puppet.type(:exec).create( + :name => "echo one >> %s" % file, + :path => "/usr/bin:/bin" + ) + + exec2 = Puppet.type(:exec).create( + :name => "echo two >> %s" % file, + :path => "/usr/bin:/bin", + :refreshonly => true, + :subscribe => ["exec", exec1.name] + ) + + exec3 = Puppet.type(:exec).create( + :name => "echo three >> %s" % file, + :path => "/usr/bin:/bin" + ) + + comp = newcomp(exec1,exec2,exec3) + + assert_apply(comp) + + assert(FileTest.exists?(file), "File does not exist") + + assert_equal("one\ntwo\nthree\n", File.read(file)) + end end -- cgit