@@ -113,9 +113,8 @@ impl TestContext {
113113 }
114114}
115115
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 )
119118where
120119 F : Fn ( TestContext ) -> Fut ,
121120 Fut : Future < Output = anyhow:: Result < TestContext > > ,
@@ -126,9 +125,6 @@ where
126125 let ctx = TestContext :: new_postgres ( & db_url) . await ;
127126 let ctx = f ( ctx) . await . expect ( "Postgres test failed" ) ;
128127 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 ;
132128 } else {
133129 // The github CI does not yet support running containers on Windows,
134130 // meaning that the test suite would fail.
@@ -141,7 +137,16 @@ where
141137 ) ;
142138 }
143139 }
140+ }
144141
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 ;
145150 // SQLite
146151 eprintln ! ( "Running test with SQLite" ) ;
147152 let ctx = TestContext :: new_sqlite ( ) . await ;
0 commit comments