You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Also update the CATS service broker to retrieve the value of the HTTP_X_API_INFO_LOCATION header from calls from the Cloud Controller, store it in memory, and then serve it on a new endpoint. This is a slightly more realistic way to test the SSO lifecycle, as the old helper function used by these tests hardcoded the API info endpoint as `/info`. That worked because, like `/v2/info`, its response object also had the authorization_endpoint at the top level.
message: "CF API info URL not known - either the cloud controller has not called the broker API yet, or it has failed to include a X-Api-Info-Location header that was a valid URL",
Copy file name to clipboardExpand all lines: assets/service_broker/spec/service_broker_spec.rb
+28Lines changed: 28 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,6 @@
1
1
require'spec_helper'
2
2
require'json'
3
+
require'timeout'
3
4
4
5
describeServiceBrokerdo
5
6
beforedo
@@ -200,6 +201,33 @@
200
201
end
201
202
end
202
203
204
+
describe'cf api info location'do
205
+
api_not_known_error=JSON.pretty_generate({
206
+
"error"=>true,
207
+
"message"=>"CF API info URL not known - either the cloud controller has not called the broker API yet, or it has failed to include a X-Api-Info-Location header that was a valid URL",
208
+
"path"=>"http://example.org/cf_api_info_url",
209
+
"type"=>'503'
210
+
})
211
+
212
+
context"no request to a /v2 endpoint has been made yet"do
apiInfoEndpoint:=Config.Protocol() +broker.GetApiInfoUrl() // the CF API must have already called the broker for the first time with its HTTP_X_API_INFO_LOCATION header
0 commit comments