Permalink
Browse files

Discover tests, rather than hard coding them.

  • Loading branch information...
1 parent c5f456d commit d131679d8a82bc121e175c39d4a82a0bf90585a8 @BanzaiMan BanzaiMan committed Jan 15, 2013
Showing with 4 additions and 8 deletions.
  1. +4 −8 lib/rhc/wizard.rb
View
@@ -367,17 +367,13 @@ def show_app_info_stage
true
end
+ # Perform basic tests to ensure that setup is sane
+ # search for private methods starting with "test_" and execute them
+ # do not assume test execution order
def setup_test_stage
tests_passed = false
info "Analyzing system (one dot for each test)"
- tests = [
- :test_ssh_quick,
- :test_broker_connectivity,
- :test_server_has_ssh_keys,
- :test_private_key_mode,
- :test_remote_ssh_keys,
- :test_ssh_connectivity
- ]
+ tests = private_methods.select {|m| m.to_s.start_with? 'test_'}
tests_passed = tests.all? do |test|
send(test)
end

0 comments on commit d131679

Please sign in to comment.