summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-05-05 19:47:15 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-05-05 19:47:15 +0000
commitfe16f83a1b56f5d8644ee08585cc3086d4acc2a0 (patch)
tree379798f414ceb55756930a45ea8cbdd06da47879
parentbb60cabda8d9cf4bdc7d138eadfd19ca6d8e7249 (diff)
downloadpuppet-fe16f83a1b56f5d8644ee08585cc3086d4acc2a0.tar.gz
puppet-fe16f83a1b56f5d8644ee08585cc3086d4acc2a0.tar.xz
puppet-fe16f83a1b56f5d8644ee08585cc3086d4acc2a0.zip
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
-rwxr-xr-xtest/other/events.rb29
1 files changed, 29 insertions, 0 deletions
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