diff --git a/examples/proxy_gluesql_example/Cargo.toml b/examples/proxy_gluesql_example/Cargo.toml index 9e21bee18a..1b30009e8a 100644 --- a/examples/proxy_gluesql_example/Cargo.toml +++ b/examples/proxy_gluesql_example/Cargo.toml @@ -27,3 +27,7 @@ sea-orm = { path = "../../", features = [ gluesql = { version = "0.13", default-features = false, features = [ "memory-storage", ] } + +[dev-dependencies] +smol = { version = "1.2" } +smol-potat = { version = "1.1" } diff --git a/examples/proxy_gluesql_example/src/main.rs b/examples/proxy_gluesql_example/src/main.rs index 942efd462f..616b612faa 100644 --- a/examples/proxy_gluesql_example/src/main.rs +++ b/examples/proxy_gluesql_example/src/main.rs @@ -136,3 +136,11 @@ async fn main() { let list = Entity::find().all(&db).await.unwrap().to_vec(); println!("Result: {:?}", list); } + +#[cfg(test)] +mod tests { + #[smol_potat::test] + async fn try_run() { + crate::main() + } +} diff --git a/examples/proxy_surrealdb_example/Cargo.toml b/examples/proxy_surrealdb_example/Cargo.toml index bd9106a719..9dc5b54566 100644 --- a/examples/proxy_surrealdb_example/Cargo.toml +++ b/examples/proxy_surrealdb_example/Cargo.toml @@ -22,3 +22,7 @@ sea-orm = { path = "../../", features = [ "debug-print", ] } surrealdb = { version = "1", features = ["kv-mem"] } + +[dev-dependencies] +smol = { version = "1.2" } +smol-potat = { version = "1.1" } diff --git a/examples/proxy_surrealdb_example/src/main.rs b/examples/proxy_surrealdb_example/src/main.rs index 4b94bcb6a3..90610c18b9 100644 --- a/examples/proxy_surrealdb_example/src/main.rs +++ b/examples/proxy_surrealdb_example/src/main.rs @@ -176,3 +176,11 @@ async fn main() { let list = Entity::find().all(&db).await.unwrap().to_vec(); println!("Result: {:?}", list); } + +#[cfg(test)] +mod tests { + #[smol_potat::test] + async fn try_run() { + crate::main() + } +} diff --git a/examples/proxy_wasmtime_example/Cargo.toml b/examples/proxy_wasmtime_example/Cargo.toml index a3145e35ef..1076e85b44 100644 --- a/examples/proxy_wasmtime_example/Cargo.toml +++ b/examples/proxy_wasmtime_example/Cargo.toml @@ -30,3 +30,7 @@ sea-orm = { path = "../..", features = [ "sqlx-sqlite", "runtime-async-std-rustls", ] } + +[dev-dependencies] +smol = { version = "1.2" } +smol-potat = { version = "1.1" } diff --git a/examples/proxy_wasmtime_example/src/main.rs b/examples/proxy_wasmtime_example/src/main.rs index 5be4d679f8..544b56abdf 100644 --- a/examples/proxy_wasmtime_example/src/main.rs +++ b/examples/proxy_wasmtime_example/src/main.rs @@ -97,3 +97,13 @@ async fn main() -> Result<()> { Ok(()) } + +#[cfg(test)] +mod tests { + use anyhow::Result; + + #[smol_potat::test] + async fn try_run() -> Result<()> { + crate::main() + } +}