diff options
author | Paul Berry <paul@puppetlabs.com> | 2010-11-30 12:06:52 -0800 |
---|---|---|
committer | Paul Berry <paul@puppetlabs.com> | 2010-11-30 14:39:39 -0800 |
commit | 0747b58bfef9c6bb5f1f9ac1eb6a7b3955dac2af (patch) | |
tree | 2d7273c61a3aa21d4e475f63952450a0376a6b86 /test | |
parent | f77764de3ace7cc880a77466618a5affe1b61a8e (diff) | |
download | puppet-0747b58bfef9c6bb5f1f9ac1eb6a7b3955dac2af.tar.gz puppet-0747b58bfef9c6bb5f1f9ac1eb6a7b3955dac2af.tar.xz puppet-0747b58bfef9c6bb5f1f9ac1eb6a7b3955dac2af.zip |
Maint: Modified uses of indirector.save to call the indirection directly.
This change replaces calls to <model object>.save with calls to <model
class>.indirection.save(<model object>). This makes the use of the
indirector explicit rather than implicit so that it will be easier to
search for all indirector call sites using grep. This is an
intermediate refactor on the way towards allowing indirector calls to
be explicitly routed to multiple termini.
This patch affects production code.
Diffstat (limited to 'test')
-rwxr-xr-x | test/network/handler/master.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/network/handler/master.rb b/test/network/handler/master.rb index 56d1991d5..f4bad7037 100755 --- a/test/network/handler/master.rb +++ b/test/network/handler/master.rb @@ -33,7 +33,7 @@ class TestMaster < Test::Unit::TestCase def test_hostname_is_used_if_client_is_missing @master.expects(:decode_facts).returns("hostname" => "yay") facts = Puppet::Node::Facts.new("the_facts") - Puppet::Node::Facts.indirection.stubs(:save).with(facts, nil) + Puppet::Node::Facts.indirection.stubs(:save).with(facts) Puppet::Node::Facts.expects(:new).with { |name, facts| name == "yay" }.returns(facts) @master.getconfig("facts") @@ -42,7 +42,7 @@ class TestMaster < Test::Unit::TestCase def test_facts_are_saved facts = Puppet::Node::Facts.new("the_facts") Puppet::Node::Facts.expects(:new).returns(facts) - Puppet::Node::Facts.indirection.expects(:save).with(facts, nil) + Puppet::Node::Facts.indirection.expects(:save).with(facts) @master.stubs(:decode_facts) @@ -51,7 +51,7 @@ class TestMaster < Test::Unit::TestCase def test_catalog_is_used_for_compiling facts = Puppet::Node::Facts.new("the_facts") - Puppet::Node::Facts.indirection.stubs(:save).with(facts, nil) + Puppet::Node::Facts.indirection.stubs(:save).with(facts) Puppet::Node::Facts.stubs(:new).returns(facts) @master.stubs(:decode_facts) |