We weren't correctly propagating options through to the Configurer instance.
Signed-off-by: Luke Kanies <[email protected]> --- lib/puppet/agent.rb | 4 ++-- spec/unit/agent.rb | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/puppet/agent.rb b/lib/puppet/agent.rb index 3add43e..7d8ea7a 100644 --- a/lib/puppet/agent.rb +++ b/lib/puppet/agent.rb @@ -38,7 +38,7 @@ class Puppet::Agent end # Perform a run with our client. - def run + def run(*args) if running? Puppet.notice "Run of %s already in progress; skipping" % client_class return @@ -50,7 +50,7 @@ class Puppet::Agent splay with_client do |client| begin - sync.synchronize { lock { client.run } } + sync.synchronize { lock { client.run(*args) } } rescue => detail puts detail.backtrace if Puppet[:trace] Puppet.err "Could not run %s: %s" % [client_class, detail] diff --git a/spec/unit/agent.rb b/spec/unit/agent.rb index da1cade..a583a52 100755 --- a/spec/unit/agent.rb +++ b/spec/unit/agent.rb @@ -122,6 +122,14 @@ describe Puppet::Agent do client.expects(:run).with { @agent.client.should equal(client); true } @agent.run end + + it "should run the client instance with any arguments passed to it" do + client = AgentTestClient.new + AgentTestClient.expects(:new).returns client + + client.expects(:run).with("testargs") + @agent.run("testargs") + end end describe "when splaying" do -- 1.6.1 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en -~----------~----~----~----~------~----~------~--~---
