From e455a57e844b38b2604ad4871cf5e609a7f5f33a Mon Sep 17 00:00:00 2001 From: elijah Date: Tue, 10 Dec 2013 11:09:03 -0800 Subject: added `--continue` to test run --- lib/leap_cli/commands/test.rb | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/leap_cli/commands/test.rb b/lib/leap_cli/commands/test.rb index 7066241..da4a4b5 100644 --- a/lib/leap_cli/commands/test.rb +++ b/lib/leap_cli/commands/test.rb @@ -11,10 +11,11 @@ module LeapCli; module Commands test.desc 'Run tests.' test.command :run do |run| + run.switch 'continue', :desc => 'Continue over errors and failures (default is --no-continue).', :negatable => true run.action do |global_options,options,args| manager.filter!(args).each_node do |node| ssh_connect(node) do |ssh| - ssh.run(test_cmd) + ssh.run(test_cmd(options)) end end end @@ -25,8 +26,12 @@ module LeapCli; module Commands private - def test_cmd - "#{PUPPET_DESTINATION}/bin/run_tests" + def test_cmd(options) + if options[:continue] + "#{PUPPET_DESTINATION}/bin/run_tests --continue" + else + "#{PUPPET_DESTINATION}/bin/run_tests" + end end # -- cgit v1.2.3