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(HttpUtils): Use UTF-8 when forwarding request bodies to OTP #188

Merged
merged 2 commits into from
Oct 10, 2023

Conversation

binh-dam-ibigroup
Copy link
Collaborator

@binh-dam-ibigroup binh-dam-ibigroup commented Oct 10, 2023

Checklist

  • Appropriate branch selected (all PRs must first be merged to dev before they can be merged to master)
  • Any modified or new methods or classes have helpful JavaDoc and code is thoroughly commented
  • The description lists all applicable issues this PR seeks to resolve
  • [na] The description lists any configuration setting(s) that differ from the default settings
  • All tests and CI builds passing

Description

Looking for advice on unit tests for these changes if practical.

This PR fixes the OTP request maker so that the body content uses UTF-8 encoding to support all international content.

Copy link
Contributor

@br648 br648 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change is good. Not sure how to test this to be honest!

@br648 br648 assigned binh-dam-ibigroup and unassigned br648 Oct 10, 2023
@JymDyerIBI
Copy link
Contributor

JymDyerIBI commented Oct 10, 2023

Agree, the change looks good. We don't have an HttpUtilsTest class at all, but I'll poke around and see how best to test charsets like this.

It looks like this can be exercised by adding something similar to ApiTestUtils#makePostRequest() and #makePutRequest() methods and exercising those from the unit tests.

@JymDyerIBI
Copy link
Contributor

Digging further, I see that POST and PUT are exercised in ApiUserFlowTest and ConnectedDataPlatformTest unit tests, so I think that should suffice to show that these changes don't break anything.

Copy link
Contributor

@JymDyerIBI JymDyerIBI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@binh-dam-ibigroup binh-dam-ibigroup merged commit 781aa7d into dev Oct 10, 2023
2 checks passed
@binh-dam-ibigroup binh-dam-ibigroup deleted the fix-otp-request-charset branch October 10, 2023 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants