diff options
-rw-r--r-- | lib/leap_cli/commands/test.rb | 11 |
1 files 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 # |