summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2005-08-18 19:40:00 +0000
committerLuke Kanies <luke@madstop.com>2005-08-18 19:40:00 +0000
commite87eb58ce8dc40ba8c66233bf17cea61094e7647 (patch)
tree7b1092aa811a00deba66e1253590496ed2a4d79f
parent4741eeff6bae987c9dfa9e06e2908ae91daa4d16 (diff)
downloadpuppet-e87eb58ce8dc40ba8c66233bf17cea61094e7647.tar.gz
puppet-e87eb58ce8dc40ba8c66233bf17cea61094e7647.tar.xz
puppet-e87eb58ce8dc40ba8c66233bf17cea61094e7647.zip
adding test to verify require does not kick off an event
git-svn-id: https://reductivelabs.com/svn/puppet/library/trunk@566 980ebf18-57e1-0310-9a29-db15c13687c0
-rwxr-xr-xtest/other/tc_events.rb33
1 files changed, 31 insertions, 2 deletions
diff --git a/test/other/tc_events.rb b/test/other/tc_events.rb
index d30f59437..b09436b55 100755
--- a/test/other/tc_events.rb
+++ b/test/other/tc_events.rb
@@ -16,7 +16,7 @@ class TestEvents < TestPuppet
super
end
- def test_simplerequire
+ def test_simplesubscribe
file = Puppet::Type::PFile.new(
:name => "/tmp/eventtestingA",
:create => true
@@ -45,7 +45,36 @@ class TestEvents < TestPuppet
assert_equal(1, trans.triggered?(exec, :refresh))
end
- def test_zladderrequire
+ def test_simplerequire
+ file = Puppet::Type::PFile.new(
+ :name => "/tmp/eventtestingA",
+ :create => true
+ )
+ exec = Puppet::Type::Exec.new(
+ :name => "echo true",
+ :path => "/usr/bin:/bin",
+ :refreshonly => true,
+ :require => [[file.class.name, file.name]]
+ )
+
+ @@tmpfiles << "/tmp/eventtestingA"
+
+ comp = Puppet::Type::Component.new(
+ :name => "eventtesting"
+ )
+ comp.push exec
+ trans = comp.evaluate
+ events = nil
+ assert_nothing_raised {
+ events = trans.evaluate
+ }
+
+ assert_equal(1, events.length)
+
+ assert_equal(0, trans.triggered?(exec, :refresh))
+ end
+
+ def test_ladderrequire
comps = {}
objects = {}
fname = "/tmp/eventtestfuntest"