@@ -113,9 +113,8 @@ impl TestContext {
113
113
}
114
114
}
115
115
116
- /// Runs a test against an actual database.
117
- /// Checks both Postgres and SQLite.
118
- pub ( crate ) async fn run_db_test < F , Fut > ( f : F )
116
+ /// Runs a test against an actual postgres database.
117
+ pub ( crate ) async fn run_postgres_test < F , Fut > ( f : F )
119
118
where
120
119
F : Fn ( TestContext ) -> Fut ,
121
120
Fut : Future < Output = anyhow:: Result < TestContext > > ,
@@ -126,9 +125,6 @@ where
126
125
let ctx = TestContext :: new_postgres ( & db_url) . await ;
127
126
let ctx = f ( ctx) . await . expect ( "Postgres test failed" ) ;
128
127
ctx. finish ( ) . await ;
129
- // We don't want to run both postgres tests & sqlite tests as some tests
130
- // are only designed for postgres
131
- return ;
132
128
} else {
133
129
// The github CI does not yet support running containers on Windows,
134
130
// meaning that the test suite would fail.
@@ -141,7 +137,16 @@ where
141
137
) ;
142
138
}
143
139
}
140
+ }
144
141
142
+ /// Runs a test against an actual database.
143
+ /// Checks both Postgres and SQLite.
144
+ pub ( crate ) async fn run_db_test < F , Fut > ( f : F )
145
+ where
146
+ F : Fn ( TestContext ) -> Fut + Clone ,
147
+ Fut : Future < Output = anyhow:: Result < TestContext > > ,
148
+ {
149
+ run_postgres_test ( f. clone ( ) ) . await ;
145
150
// SQLite
146
151
eprintln ! ( "Running test with SQLite" ) ;
147
152
let ctx = TestContext :: new_sqlite ( ) . await ;
0 commit comments