Bypass provides a quick way to create a custom plug that can be put in place instead of an actual HTTP server to return prebaked responses to client requests.
Sometime can be a little annoying to add the endpoint_url to every test file or add it to the test case.
As the endpoint url is something that in the majority of times the test needs to interact to be able to use bypass, seems to make sense that it could be grabbed easily. The port seems to be something more internal that not all tests would need to know and use.
Proposed Solution
Add endpoint_url field to bypass struct. Existing code would work normally with existing port attribute.
Motivation
Sometime can be a little annoying to add the
endpoint_url
to every test file or add it to the test case. As the endpoint url is something that in the majority of times the test needs to interact to be able to use bypass, seems to make sense that it could be grabbed easily. The port seems to be something more internal that not all tests would need to know and use.Proposed Solution
Add
endpoint_url
field to bypass struct. Existing code would work normally with existingport
attribute.