diff options
author | Paul Berry <paul@puppetlabs.com> | 2010-11-29 11:55:00 -0800 |
---|---|---|
committer | Paul Berry <paul@puppetlabs.com> | 2010-11-29 12:08:19 -0800 |
commit | 14f8160674628340ccfd79baeb84f66cf1e0398a (patch) | |
tree | 8acca5047c3e810535786b14c967e51c0623485f /test | |
parent | 52f9ef06507d87026936dc90dcb467a728ebd54f (diff) | |
download | puppet-14f8160674628340ccfd79baeb84f66cf1e0398a.tar.gz puppet-14f8160674628340ccfd79baeb84f66cf1e0398a.tar.xz puppet-14f8160674628340ccfd79baeb84f66cf1e0398a.zip |
Maint: Refactor tests to use <class>.indirection.<method>
Replaced uses of the find, search, destroy, and expire methods on
model classes with direct calls to the indirection objects. This
change affects tests only.
Diffstat (limited to 'test')
-rwxr-xr-x | test/language/parser.rb | 12 | ||||
-rwxr-xr-x | test/language/scope.rb | 6 | ||||
-rwxr-xr-x | test/language/snippets.rb | 2 | ||||
-rwxr-xr-x | test/network/handler/master.rb | 6 |
4 files changed, 13 insertions, 13 deletions
diff --git a/test/language/parser.rb b/test/language/parser.rb index 6f3d751c2..93d4ae693 100755 --- a/test/language/parser.rb +++ b/test/language/parser.rb @@ -500,9 +500,9 @@ file { "/tmp/yayness": ensure if Puppet.features.rails? Puppet[:storeconfigs] = false - Puppet::Resource::Catalog.cache_class = catalog_cache_class - Puppet::Node::Facts.cache_class = facts_cache_class - Puppet::Node.cache_class = node_cache_class + Puppet::Resource::Catalog.indirection.cache_class = catalog_cache_class + Puppet::Node::Facts.indirection.cache_class = facts_cache_class + Puppet::Node.indirection.cache_class = node_cache_class end end @@ -539,9 +539,9 @@ file { "/tmp/yayness": ensure if Puppet.features.rails? Puppet[:storeconfigs] = false - Puppet::Resource::Catalog.cache_class = catalog_cache_class - Puppet::Node::Facts.cache_class = facts_cache_class - Puppet::Node.cache_class = node_cache_class + Puppet::Resource::Catalog.indirection.cache_class = catalog_cache_class + Puppet::Node::Facts.indirection.cache_class = facts_cache_class + Puppet::Node.indirection.cache_class = node_cache_class end end diff --git a/test/language/scope.rb b/test/language/scope.rb index d9c122a92..15c321166 100755 --- a/test/language/scope.rb +++ b/test/language/scope.rb @@ -233,9 +233,9 @@ Host <<||>>" } ensure Puppet[:storeconfigs] = false - Puppet::Resource::Catalog.cache_class = catalog_cache_class - Puppet::Node::Facts.cache_class = facts_cache_class - Puppet::Node.cache_class = node_cache_class + Puppet::Resource::Catalog.indirection.cache_class = catalog_cache_class + Puppet::Node::Facts.indirection.cache_class = facts_cache_class + Puppet::Node.indirection.cache_class = node_cache_class end else $stderr.puts "No ActiveRecord -- skipping collection tests" diff --git a/test/language/snippets.rb b/test/language/snippets.rb index 51c5e23fe..e5b513a46 100755 --- a/test/language/snippets.rb +++ b/test/language/snippets.rb @@ -501,7 +501,7 @@ class TestSnippets < Test::Unit::TestCase catalog = nil assert_nothing_raised("Could not compile catalog") { - catalog = Puppet::Resource::Catalog.find(node) + catalog = Puppet::Resource::Catalog.indirection.find(node) } assert_nothing_raised("Could not convert catalog") { diff --git a/test/network/handler/master.rb b/test/network/handler/master.rb index 81869ac06..018f6904b 100755 --- a/test/network/handler/master.rb +++ b/test/network/handler/master.rb @@ -13,7 +13,7 @@ class TestMaster < Test::Unit::TestCase @master = Puppet::Network::Handler.master.new(:Manifest => tempfile) @catalog = stub 'catalog', :extract => "" - Puppet::Resource::Catalog.stubs(:find).returns(@catalog) + Puppet::Resource::Catalog.indirection.stubs(:find).returns(@catalog) end def teardown @@ -53,7 +53,7 @@ class TestMaster < Test::Unit::TestCase @master.stubs(:decode_facts) - Puppet::Resource::Catalog.expects(:find).with("foo.com").returns(@catalog) + Puppet::Resource::Catalog.indirection.expects(:find).with("foo.com").returns(@catalog) @master.getconfig("facts", "yaml", "foo.com") end @@ -68,7 +68,7 @@ class TestMasterFormats < Test::Unit::TestCase @master.stubs(:decode_facts) @catalog = stub 'catalog', :extract => "" - Puppet::Resource::Catalog.stubs(:find).returns(@catalog) + Puppet::Resource::Catalog.indirection.stubs(:find).returns(@catalog) end def test_marshal_can_be_used |