Skip to content

Commit 9a25c3b

Browse files
committed
fix(tests): ignore tests if postgres isn't up
1 parent c8da70b commit 9a25c3b

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

Diff for: databases/diesel-async/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ name = "db-diesel-async"
33
version = "1.0.0"
44
edition = "2021"
55

6+
[features]
7+
postgres_tests = []
8+
69
[dependencies]
710
actix-web.workspace = true
811
diesel = { version = "2", default-features = false, features = ["uuid"] }

Diff for: databases/diesel-async/src/main.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,8 @@ async fn initialize_db_pool() -> DbPool {
106106
Pool::builder().build(connection_manager).await.unwrap()
107107
}
108108

109-
#[cfg(test)]
109+
#[cfg(not(feature = "postgres_tests"))]
110+
#[allow(unused_imports)]
110111
mod tests {
111112
use actix_web::{http::StatusCode, test};
112113
use diesel::prelude::*;

0 commit comments

Comments
 (0)