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 S2S token passed to Transformation service #627

Merged
merged 1 commit into from Oct 5, 2019
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -53,7 +53,7 @@ public void should_return_case_details_for_successful_transformation() throws Ex

stubFor(
post(urlPathMatching(TRANSFORM_EXCEPTION_RECORD_URL))
.withHeader("ServiceAuthorization", equalTo("Bearer " + s2sToken))
.withHeader("ServiceAuthorization", equalTo(s2sToken))
.willReturn(okJson(successResponse().toString()))
);

Expand All @@ -80,7 +80,7 @@ public void should_throw_invalid_data_exception_for_unprocessable_entity_respons
String s2sToken = randomUUID().toString();
stubFor(
post(urlPathMatching(TRANSFORM_EXCEPTION_RECORD_URL))
.withHeader("ServiceAuthorization", equalTo("Bearer " + s2sToken))
.withHeader("ServiceAuthorization", equalTo(s2sToken))
.willReturn(aResponse().withBody(errorResponse().toString()).withStatus(422)));

// when
Expand All @@ -106,7 +106,7 @@ public void should_throw_invalid_data_exception_for_bad_request() throws Excepti
String s2sToken = randomUUID().toString();
stubFor(
post(urlPathMatching(TRANSFORM_EXCEPTION_RECORD_URL))
.withHeader("ServiceAuthorization", equalTo("Bearer " + s2sToken))
.withHeader("ServiceAuthorization", equalTo(s2sToken))
.willReturn(aResponse().withBody(invalidDataResponse().toString()).withStatus(400)));

// when
Expand Down
Expand Up @@ -41,7 +41,7 @@ public SuccessfulTransformationResponse transformExceptionRecord(
String s2sToken
) throws IOException, CaseTransformationException {
HttpHeaders headers = new HttpHeaders();
headers.add("ServiceAuthorization", "Bearer " + s2sToken);
headers.add("ServiceAuthorization", s2sToken);

String url =
UriComponentsBuilder
Expand Down