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/language | |
| 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/language')
| -rwxr-xr-x | test/language/parser.rb | 12 | ||||
| -rwxr-xr-x | test/language/scope.rb | 6 | ||||
| -rwxr-xr-x | test/language/snippets.rb | 2 |
3 files changed, 10 insertions, 10 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") { |
