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: update client code+tests to use Requester interface #549

Merged
merged 3 commits into from
Jan 13, 2025

Conversation

IronCore864
Copy link
Contributor

@IronCore864 IronCore864 commented Jan 8, 2025

Refactor client test framework to use the requester interface.

Closes #315.

See more information here in #310.

@IronCore864
Copy link
Contributor Author

I noticed there are some different usages like client.Requester().Do and client.doSync. Should we update them all to client.doSync to make them consistent? Or the other way around?

@IronCore864 IronCore864 requested a review from benhoyt January 10, 2025 02:50
@IronCore864 IronCore864 marked this pull request as ready for review January 10, 2025 02:50
@IronCore864
Copy link
Contributor Author

I noticed there are some different usages like client.Requester().Do and client.doSync. Should we update them all to client.doSync to make them consistent? Or the other way around?

According to the discussion in the daily sync, we decided to use client.Requester().Do.

@benhoyt benhoyt changed the title test: refactor client test to use the requester interface refactor: update client code+tests to use Requester interface Jan 10, 2025
@benhoyt
Copy link
Contributor

benhoyt commented Jan 10, 2025

According to the discussion in the daily sync, we decided to use client.Requester().Do.

Yep, thanks. It is a bit more verbose, but it's also more consistent and easier to read, because of the field names instead of calling functions that take 6 positional arguments.

Copy link
Contributor

@benhoyt benhoyt left a comment

Choose a reason for hiding this comment

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

All looks good, thanks!

Copy link
Contributor

@flotter flotter left a comment

Choose a reason for hiding this comment

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

Removing the doAsync and doSync private helpers aligns it with how we use it in derivative projects, as we do not get access to these from outside. Just a pity the same code is copied in so many places.

@IronCore864 IronCore864 merged commit 4db6a03 into canonical:master Jan 13, 2025
18 checks passed
@IronCore864 IronCore864 deleted the refactor-client-tests branch January 13, 2025 02:48
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.

Refactor client test framework now that Requester is merged
3 participants