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

FI-2533: Add general test endpoints #472

Merged
merged 14 commits into from
May 10, 2024
Merged

Conversation

Jammjammjamm
Copy link
Collaborator

@Jammjammjamm Jammjammjamm commented Mar 21, 2024

Summary

This branch adds a SuiteEndpoint class for creating generic endpoints for client testing. ResumeTestRoute has also been refactored to be a subclass of SuiteEndpoint.

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.

@Jammjammjamm Jammjammjamm requested a review from tstrass March 21, 2024 12:14
@Jammjammjamm Jammjammjamm self-assigned this Mar 21, 2024
Copy link

codecov bot commented Mar 21, 2024

Codecov Report

Attention: Patch coverage is 87.93103% with 21 lines in your changes are missing coverage. Please review.

Project coverage is 80.41%. Comparing base (d6679d0) to head (a71aa5c).

Files Patch % Lines
lib/inferno/dsl/suite_endpoint.rb 89.24% 10 Missing ⚠️
dev_suites/dev_demo_ig_stu1/demo_endpoint.rb 50.00% 7 Missing ⚠️
dev_suites/dev_demo_ig_stu1/demo_suite.rb 80.00% 4 Missing ⚠️
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              
Flag Coverage Δ
backend 94.49% <87.93%> (+0.52%) ⬆️
frontend 74.25% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

# response.body = { abc: 123 }.to_json
# response.format = :json
# end
def make_response
Copy link
Collaborator Author

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.

@Jammjammjamm Jammjammjamm requested a review from arscan March 25, 2024 17:14
@Jammjammjamm Jammjammjamm marked this pull request as ready for review March 25, 2024 17:14
@Jammjammjamm Jammjammjamm force-pushed the fi-2533-add-general-test-routes branch from d243d70 to 5368353 Compare May 2, 2024 13:07
@Jammjammjamm Jammjammjamm force-pushed the fi-2533-add-general-test-routes branch from 5368353 to a71aa5c Compare May 9, 2024 16:07
@Jammjammjamm Jammjammjamm merged commit 993a2b4 into main May 10, 2024
9 of 10 checks passed
@Jammjammjamm Jammjammjamm deleted the fi-2533-add-general-test-routes branch May 10, 2024 12:00
@rpassas rpassas mentioned this pull request May 13, 2024
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.

2 participants