diff options
author | John Keiser <jkeiser@opscode.com> | 2014-06-30 10:42:22 -0700 |
---|---|---|
committer | John Keiser <jkeiser@opscode.com> | 2014-06-30 10:43:11 -0700 |
commit | 1aa8b797ca9d2c2ccc79bb100e4cc3c67b11b798 (patch) | |
tree | e631a1fa21236ede39c887463331ac8ea0a3772a | |
parent | 9d4793bfe6371d997b5681f6b0bbbc2dfa2490db (diff) | |
download | chef-1aa8b797ca9d2c2ccc79bb100e4cc3c67b11b798.tar.gz |
Allow Pedant to run if port 8889 is blocked
-rw-r--r-- | spec/support/pedant/pedant_config.rb | 3 | ||||
-rw-r--r-- | spec/support/pedant/run_pedant.rb | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/spec/support/pedant/pedant_config.rb b/spec/support/pedant/pedant_config.rb index 7c9ddd73f1..6818d29d74 100644 --- a/spec/support/pedant/pedant_config.rb +++ b/spec/support/pedant/pedant_config.rb @@ -21,7 +21,8 @@ ################################################################################ # You MUST specify the address of the server the API requests will be # sent to. Only specify protocol, hostname, and port. -chef_server 'http://127.0.0.1:8889' +# NOTE this is assigned in run_pedant.rb, because it's possible 8889 will not be the port chosen. +#chef_server 'http://127.0.0.1:8889' # If you are doing development testing, you can specify the address of # the Solr server. The presence of this parameter will enable tests diff --git a/spec/support/pedant/run_pedant.rb b/spec/support/pedant/run_pedant.rb index 7764266afe..026ae176a6 100644 --- a/spec/support/pedant/run_pedant.rb +++ b/spec/support/pedant/run_pedant.rb @@ -26,7 +26,7 @@ def start_server(chef_repo_path) chef_fs = Chef::ChefFS::Config.new.local_fs data_store = Chef::ChefFS::ChefFSDataStore.new(chef_fs) data_store = ChefZero::DataStore::V1ToV2Adapter.new(data_store, 'chef', :org_defaults => ChefZero::DataStore::V1ToV2Adapter::ORG_DEFAULTS) - server = ChefZero::Server.new(:port => 8889, :data_store => data_store)#, :log_level => :debug) + server = ChefZero::Server.new(:port => 8889.upto(9999), :data_store => data_store)#, :log_level => :debug) server.start_background server end @@ -46,6 +46,7 @@ begin Pedant.config.suite = 'api' Pedant.config[:config_file] = 'spec/support/pedant/pedant_config.rb' + Pedant.config.chef_server = server.url Pedant.setup([ '--skip-knife', '--skip-validation', |