diff --git a/test/Main.hs b/test/Main.hs index c4abe2177..918b8680d 100644 --- a/test/Main.hs +++ b/test/Main.hs @@ -28,8 +28,14 @@ main = do result <- P.use pool $ getDbStructure "test" let dbStructure = either (error.show) id result withApp = return $ postgrest testCfg dbStructure pool + ltdApp = return $ postgrest testLtdRowsCfg dbStructure pool - hspec . mapM_ (beforeAll_ resetDb . before withApp) $ specs + hspec $ do + mapM_ (beforeAll_ resetDb . before withApp) specs + + -- this test runs with a different server flag + beforeAll_ resetDb . before ltdApp $ + describe "Feature.QueryLimitedSpec" Feature.QueryLimitedSpec.spec where specs = map (uncurry describe) [ @@ -38,7 +44,6 @@ main = do , ("Feature.CorsSpec" , Feature.CorsSpec.spec) , ("Feature.DeleteSpec" , Feature.DeleteSpec.spec) , ("Feature.InsertSpec" , Feature.InsertSpec.spec) - , ("Feature.QueryLimitedSpec" , Feature.QueryLimitedSpec.spec) , ("Feature.QuerySpec" , Feature.QuerySpec.spec) , ("Feature.RangeSpec" , Feature.RangeSpec.spec) , ("Feature.StructureSpec" , Feature.StructureSpec.spec) diff --git a/test/SpecHelper.hs b/test/SpecHelper.hs index be8a9e94f..87abae532 100644 --- a/test/SpecHelper.hs +++ b/test/SpecHelper.hs @@ -21,6 +21,10 @@ testCfg :: AppConfig testCfg = AppConfig testDbConn "postgrest_test_anonymous" "test" 3000 (secret "safe") 10 Nothing True +testLtdRowsCfg :: AppConfig +testLtdRowsCfg = + AppConfig testDbConn "postgrest_test_anonymous" "test" 3000 (secret "safe") 10 (Just 3) True + setupDb :: IO () setupDb = do void $ readProcess "psql" ["-d", "postgres", "-a", "-f", "test/fixtures/database.sql"] []