aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2013-12-10 11:09:03 -0800
committerelijah <elijah@riseup.net>2013-12-10 11:09:03 -0800
commite455a57e844b38b2604ad4871cf5e609a7f5f33a (patch)
tree5bb55f9011756472c848c9c26fab7f9d3d76acb4 /lib
parent11c182aeee2b0ef83ee8b3986583a2c657a9b6f8 (diff)
downloadleap_cli-e455a57e844b38b2604ad4871cf5e609a7f5f33a.tar.gz
leap_cli-e455a57e844b38b2604ad4871cf5e609a7f5f33a.tar.bz2
added `--continue` to test run
Diffstat (limited to 'lib')
-rw-r--r--lib/leap_cli/commands/test.rb11
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
#