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

Refactor client test framework now that Requester is merged #315

Open
flotter opened this issue Oct 10, 2023 · 2 comments
Open

Refactor client test framework now that Requester is merged #315

flotter opened this issue Oct 10, 2023 · 2 comments
Labels
25.04 Planned for the 25.04 cycle Polish Refactorings, etc

Comments

@flotter
Copy link
Contributor

flotter commented Oct 10, 2023

@flotter and @anpep have an outstanding task to refactor the client test framework to better utilise the Requester interface (#310). At the moment the test framework cannot use Requester Do() due to client.response type not used in the response body. We should also ensure all areas are properly covered.

@flotter
Copy link
Contributor Author

flotter commented Oct 10, 2023

Comment from Ben:

func (client *Client) SetDoer(d doer) {
	client.doer = d
	client.Requester().(*defaultRequester).doer = d

Should this SetDoer method be moved to a test method/function? I believe external packages can't actually call it anyway, as the doer interface isn't exported. But happy to leave this to another PR if you prefer.

@flotter
Copy link
Contributor Author

flotter commented Oct 10, 2023

Comment from Ben:

It looks like we're never setting the baseURL field -- oversight? We do use it in dispatch (somewhat surprised there's not a test for this -- we should probably add one).

@benhoyt benhoyt added Polish Refactorings, etc Low Priority The opposite of "Priority" labels Mar 13, 2024
@benhoyt benhoyt changed the title Refactor client test framework once Requester #310 is merged Refactor client test framework now that Requester is merged May 17, 2024
@benhoyt benhoyt added 24.10 and removed Low Priority The opposite of "Priority" labels May 17, 2024
@benhoyt benhoyt added 25.04 Planned for the 25.04 cycle and removed 24.10 labels Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
25.04 Planned for the 25.04 cycle Polish Refactorings, etc
Projects
None yet
Development

No branches or pull requests

2 participants