diff options
| author | Luke Kanies <luke@madstop.com> | 2007-12-11 15:35:36 -0600 |
|---|---|---|
| committer | Luke Kanies <luke@madstop.com> | 2007-12-11 15:35:36 -0600 |
| commit | cb0c4eebb0a7b2fadc5e0487e1c692007cb8b2e5 (patch) | |
| tree | b4284addea69adf9d19028ff1bab94035b1c1827 /test/lib | |
| parent | 7ac3bd79621f6c66cd3b5b7041aeba83c27c3602 (diff) | |
| download | puppet-cb0c4eebb0a7b2fadc5e0487e1c692007cb8b2e5.tar.gz puppet-cb0c4eebb0a7b2fadc5e0487e1c692007cb8b2e5.tar.xz puppet-cb0c4eebb0a7b2fadc5e0487e1c692007cb8b2e5.zip | |
Renaming 'configuration' to 'catalog', fixing #954.
Diffstat (limited to 'test/lib')
| -rw-r--r-- | test/lib/puppettest/parsertesting.rb | 2 | ||||
| -rw-r--r-- | test/lib/puppettest/support/assertions.rb | 4 | ||||
| -rwxr-xr-x | test/lib/puppettest/support/resources.rb | 4 | ||||
| -rw-r--r-- | test/lib/puppettest/support/utils.rb | 14 |
4 files changed, 12 insertions, 12 deletions
diff --git a/test/lib/puppettest/parsertesting.rb b/test/lib/puppettest/parsertesting.rb index 3e3ce6cb9..6fd60180a 100644 --- a/test/lib/puppettest/parsertesting.rb +++ b/test/lib/puppettest/parsertesting.rb @@ -312,7 +312,7 @@ module PuppetTest::ParserTesting config = nil assert_nothing_raised { - config = trans.extract.to_configuration + config = trans.extract.to_catalog } config.apply diff --git a/test/lib/puppettest/support/assertions.rb b/test/lib/puppettest/support/assertions.rb index 906bb3c76..2159c8d3e 100644 --- a/test/lib/puppettest/support/assertions.rb +++ b/test/lib/puppettest/support/assertions.rb @@ -52,7 +52,7 @@ module PuppetTest msg = resources.pop end - config = resources2config(*resources) + config = resources2catalog(*resources) transaction = Puppet::Transaction.new(config) run_events(:evaluate, transaction, events, msg) @@ -62,7 +62,7 @@ module PuppetTest # A simpler method that just applies what we have. def assert_apply(*resources) - config = resources2config(*resources) + config = resources2catalog(*resources) events = nil assert_nothing_raised("Failed to evaluate") { diff --git a/test/lib/puppettest/support/resources.rb b/test/lib/puppettest/support/resources.rb index 18d7caa77..384f61c33 100755 --- a/test/lib/puppettest/support/resources.rb +++ b/test/lib/puppettest/support/resources.rb @@ -25,13 +25,13 @@ module PuppetTest::Support::Resources end def mktree - configuration = Puppet::Node::Configuration.new do |config| + catalog = Puppet::Node::Catalog.new do |config| one = treenode(config, "one", "a", "b") two = treenode(config, "two", "c", "d") middle = treenode(config, "middle", "e", "f", two) top = treenode(config, "top", "g", "h", middle, one) end - return configuration + return catalog end end diff --git a/test/lib/puppettest/support/utils.rb b/test/lib/puppettest/support/utils.rb index d9bd6b2b6..cb4a6924c 100644 --- a/test/lib/puppettest/support/utils.rb +++ b/test/lib/puppettest/support/utils.rb @@ -21,10 +21,10 @@ module PuppetTest::Support::Utils } end - # Turn a list of resources, or possibly a configuration and some resources, - # into a configuration object. - def resources2config(*resources) - if resources[0].is_a?(Puppet::Node::Configuration) + # Turn a list of resources, or possibly a catalog and some resources, + # into a catalog object. + def resources2catalog(*resources) + if resources[0].is_a?(Puppet::Node::Catalog) config = resources.shift unless resources.empty? resources.each { |r| config.add_resource r } @@ -34,7 +34,7 @@ module PuppetTest::Support::Utils comp = resources.shift comp.delve else - config = Puppet::Node::Configuration.new + config = Puppet::Node::Catalog.new resources.each { |res| config.add_resource res } end return config @@ -159,13 +159,13 @@ module PuppetTest::Support::Utils } end - def mk_configuration(*resources) + def mk_catalog(*resources) if resources[0].is_a?(String) name = resources.shift else name = :testing end - config = Puppet::Node::Configuration.new :testing do |conf| + config = Puppet::Node::Catalog.new :testing do |conf| resources.each { |resource| conf.add_resource resource } end |
