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

[examples] Demonstrate how to mock test SeaORM's CURD operations on common web APIs #830

Closed
billy1624 opened this issue Jun 30, 2022 · 3 comments · Fixed by #890
Closed
Assignees

Comments

@billy1624
Copy link
Member

billy1624 commented Jun 30, 2022

Motivation

Some web API enforce app state to be Clone in particular, Axum, Rocket, etc. However, when mock feature is enabled on SeaORM, it will make DatabaseConnection not cloneable. And this cause trouble for users who want to mock test their web API endpoints.

Proposed Solutions

Separating the API into two standalone crates namely api and core, then we unit test the core and the api is just a wrapper of the core.

Similar to what we did in StarfishQL:

Additional Information

Related Issues / PRs

@billy1624
Copy link
Member Author

@tyt2y3 thoughts?

@billy1624
Copy link
Member Author

Hey @shpun817, would you like to take on this?

@shpun817
Copy link
Member

Hey @shpun817, would you like to take on this?

Okay!

@billy1624 billy1624 moved this from Triage to In Progress in SeaQL Dev Tracker Jul 14, 2022
@billy1624 billy1624 moved this from In Progress to Next Up in SeaQL Dev Tracker Aug 2, 2022
@billy1624 billy1624 moved this from Next Up to Open for Contributions in SeaQL Dev Tracker Aug 10, 2022
@billy1624 billy1624 moved this from Open for Contributions to Done in SeaQL Dev Tracker Jan 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
2 participants