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

feat: mock transport instead of provider #2173

Merged
merged 2 commits into from
Mar 10, 2025
Merged

Conversation

DaniPopes
Copy link
Member

@DaniPopes DaniPopes commented Mar 10, 2025

MockProvider currently tries to mock every response at the json level; this is way easier to implement and maintain at the transport level. This also allows testing with any layer and filler combination.

@DaniPopes DaniPopes force-pushed the dani/mock-transport branch from 4f601fd to 8da6401 Compare March 10, 2025 06:00
Copy link
Member

@yash-atreya yash-atreya left a comment

Choose a reason for hiding this comment

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

MockProvider impl was for providing a smol UX improvement:

provider.asserter();
provider.push_response();
provider.push_error();

But this didn't work with layers, and made maintenance cumbersome.

OK with moving to transport impl

lgtm!

@DaniPopes DaniPopes enabled auto-merge (squash) March 10, 2025 06:14
@yash-atreya yash-atreya added breaking Breaking changes have been made c-transport Pertaining to the transport crates c-provider labels Mar 10, 2025
@DaniPopes DaniPopes merged commit 271c9d8 into main Mar 10, 2025
27 checks passed
@DaniPopes DaniPopes deleted the dani/mock-transport branch March 10, 2025 06:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking Breaking changes have been made c-provider c-transport Pertaining to the transport crates
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants