diff options
| author | Luke Kanies <luke@madstop.com> | 2005-05-30 23:02:40 +0000 |
|---|---|---|
| committer | Luke Kanies <luke@madstop.com> | 2005-05-30 23:02:40 +0000 |
| commit | 922994edc1447e523ba0ddc4efa0c9b61fa55fc8 (patch) | |
| tree | 727f93d93c7d548bfc1aed4f51033aaa43cc21a8 /test | |
| parent | cdfdfb9d1bbfb9c5a93acdfcb97e61d92a28e3b6 (diff) | |
| download | puppet-922994edc1447e523ba0ddc4efa0c9b61fa55fc8.tar.gz puppet-922994edc1447e523ba0ddc4efa0c9b61fa55fc8.tar.xz puppet-922994edc1447e523ba0ddc4efa0c9b61fa55fc8.zip | |
everything passes all of the tests, but i do not think the component-level metaparams are working
git-svn-id: https://reductivelabs.com/svn/puppet/library/trunk@289 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'test')
| -rw-r--r-- | test/other/tc_transactions.rb | 39 | ||||
| -rw-r--r-- | test/types/tc_basic.rb | 7 | ||||
| -rw-r--r-- | test/types/tc_query.rb | 8 |
3 files changed, 46 insertions, 8 deletions
diff --git a/test/other/tc_transactions.rb b/test/other/tc_transactions.rb index 1ac5b4edb..47094b078 100644 --- a/test/other/tc_transactions.rb +++ b/test/other/tc_transactions.rb @@ -179,6 +179,26 @@ class TestTransactions < Test::Unit::TestCase transaction.evaluate } + fakevent = Blink::Event.new( + :event => :ALL_EVENTS, + :object => self, + :transaction => transaction, + :message => "yay" + ) + + sub = nil + assert_nothing_raised() { + sub = file.subscribers?(fakevent) + } + + assert(sub) + + # assert we got exactly one trigger on this subscription + # in other words, we don't want a single event to cause many + # restarts + # XXX i don't have a good way to retrieve this information... + #assert_equal(1,transaction.triggercount(sub)) + # now set everything back to how it was assert_nothing_raised() { service[:running] = 0 @@ -232,6 +252,25 @@ class TestTransactions < Test::Unit::TestCase transaction.evaluate } + fakevent = Blink::Event.new( + :event => :ALL_EVENTS, + :object => self, + :transaction => transaction, + :message => "yay" + ) + + sub = nil + assert_nothing_raised() { + sub = fcomp.subscribers?(fakevent) + } + + assert(sub) + + # assert we got exactly one trigger on this subscription + # XXX this doesn't work, because the sub is being triggered in + # a contained transaction, not this one + #assert_equal(1,transaction.triggercount(sub)) + # now set everything back to how it was assert_nothing_raised() { service[:running] = 0 diff --git a/test/types/tc_basic.rb b/test/types/tc_basic.rb index eed483e5d..d42e8c5d8 100644 --- a/test/types/tc_basic.rb +++ b/test/types/tc_basic.rb @@ -21,7 +21,7 @@ class TestBasic < Test::Unit::TestCase Blink[:debug] = 1 assert_nothing_raised() { - @component = Blink::Component.new(:name => "component") + @component = Blink::Component.new(:name => "yaytest") } assert_nothing_raised() { @@ -56,8 +56,13 @@ class TestBasic < Test::Unit::TestCase #puts "ConfigFile is %s, id %s" % [@configfile, @configfile.object_id] end + def teardown + Blink::Type.allclear + end + def test_name_calls [@sleeper,@configfile].each { |obj| + Blink.error "obj is %s" % obj assert_nothing_raised(){ obj.name } diff --git a/test/types/tc_query.rb b/test/types/tc_query.rb index 66fb50b05..cd53fcdac 100644 --- a/test/types/tc_query.rb +++ b/test/types/tc_query.rb @@ -9,7 +9,7 @@ require 'test/unit' # $Id$ -class TestBasic < Test::Unit::TestCase +class TestQuery < Test::Unit::TestCase def setup Blink[:debug] = true end @@ -106,10 +106,4 @@ class TestBasic < Test::Unit::TestCase component.retrieve } end - - def teardown - assert_nothing_raised() { - Blink::Type.allclear - } - end end |
