Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(assets/service_broker): Use RewindableInput middleware #1037

Merged
merged 3 commits into from
Jan 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions assets/service_broker/config.ru
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
$: << File.expand_path("../.", __FILE__)

require "service_broker"

use Rack::RewindableInput::Middleware

run ServiceBroker
2 changes: 1 addition & 1 deletion assets/service_broker/service_broker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ def respond_from_config(behavior)
end

def cf_respond_with_api_info_location(cf_api_info_location)
if cf_api_info_location.empty?
if cf_api_info_location.nil? || cf_api_info_location.empty?
status 503
log_response(status, JSON.pretty_generate({
error: true,
Expand Down
6 changes: 3 additions & 3 deletions assets/service_broker/spec/service_broker_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ def unbind
Timeout::timeout(1) do
send(action)
end
end.to raise_error(TimeoutError)
end.to raise_error(Timeout::Error)
end

it 'can be customized on a per-plan basis' do
Expand Down Expand Up @@ -446,13 +446,13 @@ def unbind
Timeout::timeout(1) do
get '/v2/service_instances/fake-guid/last_operation'
end
end.to raise_error(TimeoutError)
end.to raise_error(Timeout::Error)

expect do
Timeout::timeout(0.5) do
get '/v2/service_instances/fake-guid/last_operation'
end
end.to raise_error(TimeoutError)
end.to raise_error(Timeout::Error)
end

it 'honors max_fetch_service_instance_request' do
Expand Down