Skip to content

Commit

Permalink
[webui] let the test api start the backend right away
Browse files Browse the repository at this point in the history
  • Loading branch information
coolo committed Nov 17, 2012
1 parent 4e8baf8 commit 6b51e0f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions src/webui/app/controllers/main_controller.rb
Expand Up @@ -151,9 +151,7 @@ def require_available_architectures
# of course we don't want to have this action visible
hide_action :startme unless Rails.env.test? || Rails.env.development?
def startme
if Rails.env.test?
frontend.transport.direct_http URI("/admin/startme")
end
frontend.transport.direct_http URI("/")
render_error :status => 200, :message => "no error"
return
end
Expand Down
2 changes: 1 addition & 1 deletion src/webui/script/start_test_api
Expand Up @@ -52,7 +52,7 @@ while true
Net::HTTP.start(CONFIG['frontend_host'], CONFIG['frontend_port']) do |http|
http.open_timeout = 15
http.read_timeout = 15
res = http.get('/')
res = http.get('/admin/startme')
case res
when Net::HTTPSuccess, Net::HTTPRedirection, Net::HTTPUnauthorized
outputlines = false
Expand Down

0 comments on commit 6b51e0f

Please sign in to comment.