Skip to content

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

@billy1624

Description

@billy1624

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions