diff --git a/examples/rocket_example/core/Cargo.toml b/examples/rocket_example/core/Cargo.toml index 79226dc8da..7190d11d4c 100644 --- a/examples/rocket_example/core/Cargo.toml +++ b/examples/rocket_example/core/Cargo.toml @@ -21,6 +21,9 @@ features = [ [dev-dependencies] tokio = "1.20.0" +[features] +mock = ["sea-orm/mock"] + [[test]] name = "mock" -required-features = ["sea-orm/mock"] +required-features = ["mock"] diff --git a/examples/rocket_example/core/tests/prepare.rs b/examples/rocket_example/core/tests/prepare.rs index 1afb9af92f..451804937e 100644 --- a/examples/rocket_example/core/tests/prepare.rs +++ b/examples/rocket_example/core/tests/prepare.rs @@ -1,6 +1,7 @@ use ::entity::post; use sea_orm::*; +#[cfg(feature = "mock")] pub fn prepare_mock_db() -> DatabaseConnection { MockDatabase::new(DatabaseBackend::Postgres) .append_query_results(vec![