Run QueryLimitedSpec with its own server flags
This commit is contained in:
+7
-2
@@ -28,8 +28,14 @@ main = do
|
|||||||
result <- P.use pool $ getDbStructure "test"
|
result <- P.use pool $ getDbStructure "test"
|
||||||
let dbStructure = either (error.show) id result
|
let dbStructure = either (error.show) id result
|
||||||
withApp = return $ postgrest testCfg dbStructure pool
|
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
|
where
|
||||||
specs = map (uncurry describe) [
|
specs = map (uncurry describe) [
|
||||||
@@ -38,7 +44,6 @@ main = do
|
|||||||
, ("Feature.CorsSpec" , Feature.CorsSpec.spec)
|
, ("Feature.CorsSpec" , Feature.CorsSpec.spec)
|
||||||
, ("Feature.DeleteSpec" , Feature.DeleteSpec.spec)
|
, ("Feature.DeleteSpec" , Feature.DeleteSpec.spec)
|
||||||
, ("Feature.InsertSpec" , Feature.InsertSpec.spec)
|
, ("Feature.InsertSpec" , Feature.InsertSpec.spec)
|
||||||
, ("Feature.QueryLimitedSpec" , Feature.QueryLimitedSpec.spec)
|
|
||||||
, ("Feature.QuerySpec" , Feature.QuerySpec.spec)
|
, ("Feature.QuerySpec" , Feature.QuerySpec.spec)
|
||||||
, ("Feature.RangeSpec" , Feature.RangeSpec.spec)
|
, ("Feature.RangeSpec" , Feature.RangeSpec.spec)
|
||||||
, ("Feature.StructureSpec" , Feature.StructureSpec.spec)
|
, ("Feature.StructureSpec" , Feature.StructureSpec.spec)
|
||||||
|
|||||||
@@ -21,6 +21,10 @@ testCfg :: AppConfig
|
|||||||
testCfg =
|
testCfg =
|
||||||
AppConfig testDbConn "postgrest_test_anonymous" "test" 3000 (secret "safe") 10 Nothing True
|
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 :: IO ()
|
||||||
setupDb = do
|
setupDb = do
|
||||||
void $ readProcess "psql" ["-d", "postgres", "-a", "-f", "test/fixtures/database.sql"] []
|
void $ readProcess "psql" ["-d", "postgres", "-a", "-f", "test/fixtures/database.sql"] []
|
||||||
|
|||||||
Reference in New Issue
Block a user