-
Notifications
You must be signed in to change notification settings - Fork 5
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
FI-2533: Add general test endpoints #472
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #472 +/- ##
==========================================
+ Coverage 80.11% 80.41% +0.29%
==========================================
Files 236 238 +2
Lines 11744 11862 +118
Branches 1136 1150 +14
==========================================
+ Hits 9409 9539 +130
+ Misses 1676 1664 -12
Partials 659 659
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
# response.body = { abc: 123 }.to_json | ||
# response.format = :json | ||
# end | ||
def make_response |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wanted this to be build_response
, but that is an existing method in Hanami::Action
. Very open to better name suggestions.
d243d70
to
5368353
Compare
5368353
to
a71aa5c
Compare
Summary
This branch adds a
SuiteEndpoint
class for creating generic endpoints for client testing.ResumeTestRoute
has also been refactored to be a subclass ofSuiteEndpoint
.As part of this change, it was necessary to update a bunch of the
dry-*
gems, so this branch also includes various small changes to handle api changes in those gems.Testing Guidance
ResumeTestRoute
has been refactored to be based on SuiteEndpoint, and is covered by unit tests. The wait group in the demo suite can also be used to see that those endpoints are working as intended.A group has been added to the end of the demo suite with a simple SuiteEndpoint. Make a POST to the endpoint with Postman/curl/etc. using a bearer token you provide, and you should see that the test resumes, the request can be identified by name or tags, and the response has all of the headers you see in the tool you used to make the request.