-
-
Notifications
You must be signed in to change notification settings - Fork 521
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
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Motivation
Some web API enforce app state to be
Clone
in particular, Axum, Rocket, etc. However, whenmock
feature is enabled on SeaORM, it will makeDatabaseConnection
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
andcore
, then we unit test thecore
and theapi
is just a wrapper of thecore
.Similar to what we did in StarfishQL:
core
: https://github.com/SeaQL/starfish-ql/tree/main/starfish/starfish-coreapi
: https://github.com/SeaQL/starfish-ql/tree/main/starfish/starfish-apiAdditional Information
Related Issues / PRs
DatabaseConnection
Clone
with the default features enabled #438DatabaseConnection
always deriveClone
#665The text was updated successfully, but these errors were encountered: