From 60b64d3e81799e12e73e2c216807bed58c2a178e Mon Sep 17 00:00:00 2001 From: Robert Vollmert Date: Sat, 7 Mar 2020 13:46:22 +0100 Subject: [PATCH] Upgrade hspec-wai dependency to 0.10. --- postgrest.cabal | 8 +++---- stack.yaml | 2 ++ stack.yaml.lock | 14 ++++++++++++ test/Feature/AndOrParamsSpec.hs | 2 +- test/Feature/AsymmetricJwtSpec.hs | 2 +- test/Feature/AudienceJwtSecretSpec.hs | 2 +- test/Feature/AuthSpec.hs | 2 +- test/Feature/BinaryJwtSecretSpec.hs | 2 +- test/Feature/ConcurrentSpec.hs | 10 ++++----- test/Feature/CorsSpec.hs | 2 +- test/Feature/DeleteSpec.hs | 2 +- test/Feature/EmbedDisambiguationSpec.hs | 2 +- test/Feature/ExtraSearchPathSpec.hs | 2 +- test/Feature/HtmlRawOutputSpec.hs | 2 +- test/Feature/InsertSpec.hs | 2 +- test/Feature/JsonOperatorSpec.hs | 2 +- test/Feature/NoJwtSpec.hs | 2 +- test/Feature/NonexistentSchemaSpec.hs | 2 +- test/Feature/PgVersion95Spec.hs | 2 +- test/Feature/PgVersion96Spec.hs | 2 +- test/Feature/ProxySpec.hs | 2 +- test/Feature/QueryLimitedSpec.hs | 2 +- test/Feature/QuerySpec.hs | 2 +- test/Feature/RangeSpec.hs | 2 +- test/Feature/RawOutputTypesSpec.hs | 2 +- test/Feature/RootSpec.hs | 2 +- test/Feature/RpcSpec.hs | 2 +- test/Feature/SingularSpec.hs | 2 +- test/Feature/StructureSpec.hs | 2 +- test/Feature/UnicodeSpec.hs | 2 +- test/Feature/UpsertSpec.hs | 2 +- test/Main.hs | 30 +++++++++++++------------ test/SpecHelper.hs | 2 +- 33 files changed, 69 insertions(+), 51 deletions(-) diff --git a/postgrest.cabal b/postgrest.cabal index 46ea4c592..0538a6bbd 100644 --- a/postgrest.cabal +++ b/postgrest.cabal @@ -167,8 +167,8 @@ test-suite spec , hasql-transaction >= 0.7.2 && < 0.8 , heredoc >= 0.2 && < 0.3 , hspec >= 2.3 && < 2.8 - , hspec-wai >= 0.7 && < 0.10 - , hspec-wai-json >= 0.7 && < 0.10 + , hspec-wai >= 0.10 && < 0.11 + , hspec-wai-json >= 0.10 && < 0.11 , http-types >= 0.12.3 && < 0.13 , lens >= 4.14 && < 4.18 , lens-aeson >= 1.0.1 && < 1.1 @@ -211,8 +211,8 @@ Test-Suite spec-querycost , hasql-transaction >= 0.7.2 && < 0.8 , heredoc >= 0.2 && < 0.3 , hspec >= 2.3 && < 2.8 - , hspec-wai >= 0.7 && < 0.10 - , hspec-wai-json >= 0.7 && < 0.10 + , hspec-wai >= 0.10 && < 0.11 + , hspec-wai-json >= 0.10 && < 0.11 , http-types >= 0.12.3 && < 0.13 , lens >= 4.14 && < 4.18 , lens-aeson >= 1.0.1 && < 1.1 diff --git a/stack.yaml b/stack.yaml index d31d9e03c..f16d90793 100644 --- a/stack.yaml +++ b/stack.yaml @@ -15,3 +15,5 @@ nix: extra-deps: - HsYAML-0.2.1.0@sha256:e4677daeba57f7a1e9a709a1f3022fe937336c91513e893166bd1f023f530d68,5311 - HsYAML-aeson-0.2.0.0@sha256:04796abfc01cffded83f37a10e6edba4f0c0a15d45bef44fc5bb4313d9c87757,1791 + - hspec-wai-0.10.1@sha256:56dd9ec1d56f47ef1946f71f7cbf070e4c285f718cac1b158400ae5e7172ef47,2290 + - hspec-wai-json-0.10.1@sha256:67b405c38f0a9e2771480c8d3ecd8aeb8d8776a35d3b2906cb1b76c9538617e4,1629 diff --git a/stack.yaml.lock b/stack.yaml.lock index d08997c30..02719eb39 100644 --- a/stack.yaml.lock +++ b/stack.yaml.lock @@ -18,6 +18,20 @@ packages: sha256: 67cc9ba17c79e71d3abdb465a3ee2825477856fff3b8b7d543cbbbefdae9a9d9 original: hackage: HsYAML-aeson-0.2.0.0@sha256:04796abfc01cffded83f37a10e6edba4f0c0a15d45bef44fc5bb4313d9c87757,1791 +- completed: + hackage: hspec-wai-0.10.1@sha256:56dd9ec1d56f47ef1946f71f7cbf070e4c285f718cac1b158400ae5e7172ef47,2290 + pantry-tree: + size: 809 + sha256: 17af1c2e709cd84bfda066b9ebb04cdde7f92660c51a1f7401a1e9f766524e93 + original: + hackage: hspec-wai-0.10.1@sha256:56dd9ec1d56f47ef1946f71f7cbf070e4c285f718cac1b158400ae5e7172ef47,2290 +- completed: + hackage: hspec-wai-json-0.10.1@sha256:67b405c38f0a9e2771480c8d3ecd8aeb8d8776a35d3b2906cb1b76c9538617e4,1629 + pantry-tree: + size: 349 + sha256: fb9e89b79cde3276baa484c860c6b9eeebdbc1a5c43301293351a25bc4c08e87 + original: + hackage: hspec-wai-json-0.10.1@sha256:67b405c38f0a9e2771480c8d3ecd8aeb8d8776a35d3b2906cb1b76c9538617e4,1629 snapshots: - completed: size: 523878 diff --git a/test/Feature/AndOrParamsSpec.hs b/test/Feature/AndOrParamsSpec.hs index 9193b91b4..f315f1a00 100644 --- a/test/Feature/AndOrParamsSpec.hs +++ b/test/Feature/AndOrParamsSpec.hs @@ -11,7 +11,7 @@ import PostgREST.Types (PgVersion, pgVersion112) import Protolude hiding (get) import SpecHelper -spec :: PgVersion -> SpecWith Application +spec :: PgVersion -> SpecWith ((), Application) spec actualPgVersion = describe "and/or params used for complex boolean logic" $ do context "used with GET" $ do diff --git a/test/Feature/AsymmetricJwtSpec.hs b/test/Feature/AsymmetricJwtSpec.hs index 780220a25..c2c46b23a 100644 --- a/test/Feature/AsymmetricJwtSpec.hs +++ b/test/Feature/AsymmetricJwtSpec.hs @@ -11,7 +11,7 @@ import Protolude import SpecHelper -- }}} -spec :: SpecWith Application +spec :: SpecWith ((), Application) spec = describe "server started with asymmetric JWK" $ -- this test will stop working 9999999999s after the UNIX EPOCH diff --git a/test/Feature/AudienceJwtSecretSpec.hs b/test/Feature/AudienceJwtSecretSpec.hs index 6cd5912b1..e5a91ff30 100644 --- a/test/Feature/AudienceJwtSecretSpec.hs +++ b/test/Feature/AudienceJwtSecretSpec.hs @@ -11,7 +11,7 @@ import Protolude hiding (get) import SpecHelper -- }}} -spec :: SpecWith Application +spec :: SpecWith ((), Application) spec = describe "test handling of aud claims in JWT" $ do -- this test will stop working 9999999999s after the UNIX EPOCH diff --git a/test/Feature/AuthSpec.hs b/test/Feature/AuthSpec.hs index f8e964dfe..109018861 100644 --- a/test/Feature/AuthSpec.hs +++ b/test/Feature/AuthSpec.hs @@ -12,7 +12,7 @@ import PostgREST.Types (PgVersion, pgVersion112) import Protolude hiding (get) import SpecHelper -spec :: PgVersion -> SpecWith Application +spec :: PgVersion -> SpecWith ((), Application) spec actualPgVersion = describe "authorization" $ do let single = ("Accept","application/vnd.pgrst.object+json") diff --git a/test/Feature/BinaryJwtSecretSpec.hs b/test/Feature/BinaryJwtSecretSpec.hs index 6229aad93..599f7e2f2 100644 --- a/test/Feature/BinaryJwtSecretSpec.hs +++ b/test/Feature/BinaryJwtSecretSpec.hs @@ -11,7 +11,7 @@ import Protolude import SpecHelper -- }}} -spec :: SpecWith Application +spec :: SpecWith ((), Application) spec = describe "server started with binary JWT secret" $ -- this test will stop working 9999999999s after the UNIX EPOCH diff --git a/test/Feature/ConcurrentSpec.hs b/test/Feature/ConcurrentSpec.hs index ffbb79ed9..cab23aec8 100644 --- a/test/Feature/ConcurrentSpec.hs +++ b/test/Feature/ConcurrentSpec.hs @@ -19,7 +19,7 @@ import Test.Hspec.Wai.JSON import Protolude hiding (get) -spec :: SpecWith Application +spec :: SpecWith ((), Application) spec = describe "Queryiny in parallel" $ it "should not raise 'transaction in progress' error" $ @@ -35,13 +35,13 @@ spec = , matchHeaders = [] } -raceTest :: Int -> WaiExpectation -> WaiExpectation +raceTest :: Int -> WaiExpectation st -> WaiExpectation st raceTest times = liftBaseDiscard go where go test = void $ mapConcurrently (const test) [1..times] -instance MonadBaseControl IO WaiSession where - type StM WaiSession a = StM Session a +instance MonadBaseControl IO (WaiSession st) where + type StM (WaiSession st) a = StM Session a liftBaseWith f = WaiSession $ liftBaseWith $ \runInBase -> f $ \k -> runInBase (unWaiSession k) @@ -49,5 +49,5 @@ instance MonadBaseControl IO WaiSession where {-# INLINE liftBaseWith #-} {-# INLINE restoreM #-} -instance MonadBase IO WaiSession where +instance MonadBase IO (WaiSession st) where liftBase = liftIO diff --git a/test/Feature/CorsSpec.hs b/test/Feature/CorsSpec.hs index 6115c33e1..cdadef638 100644 --- a/test/Feature/CorsSpec.hs +++ b/test/Feature/CorsSpec.hs @@ -14,7 +14,7 @@ import Protolude import SpecHelper -- }}} -spec :: SpecWith Application +spec :: SpecWith ((), Application) spec = describe "CORS" $ do let preflightHeaders = [ diff --git a/test/Feature/DeleteSpec.hs b/test/Feature/DeleteSpec.hs index de549f2d9..0acc52441 100644 --- a/test/Feature/DeleteSpec.hs +++ b/test/Feature/DeleteSpec.hs @@ -10,7 +10,7 @@ import Text.Heredoc import Protolude hiding (get) -spec :: SpecWith Application +spec :: SpecWith ((), Application) spec = describe "Deleting" $ do context "existing record" $ do diff --git a/test/Feature/EmbedDisambiguationSpec.hs b/test/Feature/EmbedDisambiguationSpec.hs index 242c5ece1..b9cbb49ac 100644 --- a/test/Feature/EmbedDisambiguationSpec.hs +++ b/test/Feature/EmbedDisambiguationSpec.hs @@ -10,7 +10,7 @@ import Text.Heredoc import Protolude hiding (get) import SpecHelper -spec :: SpecWith Application +spec :: SpecWith ((), Application) spec = describe "resource embedding disambiguation" $ do context "ambiguous requests that give 300 Multiple Choices" $ do diff --git a/test/Feature/ExtraSearchPathSpec.hs b/test/Feature/ExtraSearchPathSpec.hs index c1c2e1126..6df40bf2f 100644 --- a/test/Feature/ExtraSearchPathSpec.hs +++ b/test/Feature/ExtraSearchPathSpec.hs @@ -9,7 +9,7 @@ import Test.Hspec.Wai.JSON import Protolude import SpecHelper -spec :: SpecWith Application +spec :: SpecWith ((), Application) spec = describe "extra search path" $ do it "finds the ltree <@ operator on the public schema" $ diff --git a/test/Feature/HtmlRawOutputSpec.hs b/test/Feature/HtmlRawOutputSpec.hs index 490b7b386..ace649e14 100644 --- a/test/Feature/HtmlRawOutputSpec.hs +++ b/test/Feature/HtmlRawOutputSpec.hs @@ -10,7 +10,7 @@ import Text.Heredoc import Protolude hiding (get) import SpecHelper (acceptHdrs) -spec :: SpecWith Application +spec :: SpecWith ((), Application) spec = describe "When raw-media-types is set to \"text/html\"" $ it "can get raw output with Accept: text/html" $ request methodGet "/rpc/welcome.html" (acceptHdrs "text/html") "" diff --git a/test/Feature/InsertSpec.hs b/test/Feature/InsertSpec.hs index ca99620dd..ce0fe4aaf 100644 --- a/test/Feature/InsertSpec.hs +++ b/test/Feature/InsertSpec.hs @@ -20,7 +20,7 @@ import PostgREST.Types (PgVersion, pgVersion112) import Protolude hiding (get) import SpecHelper -spec :: PgVersion -> SpecWith Application +spec :: PgVersion -> SpecWith ((), Application) spec actualPgVersion = do describe "Posting new record" $ do context "disparate json types" $ do diff --git a/test/Feature/JsonOperatorSpec.hs b/test/Feature/JsonOperatorSpec.hs index 1f3b4166c..7367bcdab 100644 --- a/test/Feature/JsonOperatorSpec.hs +++ b/test/Feature/JsonOperatorSpec.hs @@ -11,7 +11,7 @@ import PostgREST.Types (PgVersion, pgVersion112) import Protolude hiding (get) import SpecHelper -spec :: PgVersion -> SpecWith Application +spec :: PgVersion -> SpecWith ((), Application) spec actualPgVersion = describe "json and jsonb operators" $ do context "Shaping response with select parameter" $ do it "obtains a json subfield one level with casting" $ diff --git a/test/Feature/NoJwtSpec.hs b/test/Feature/NoJwtSpec.hs index 453bd8fd6..4e7b65242 100644 --- a/test/Feature/NoJwtSpec.hs +++ b/test/Feature/NoJwtSpec.hs @@ -13,7 +13,7 @@ import Protolude import SpecHelper -- }}} -spec :: SpecWith Application +spec :: SpecWith ((), Application) spec = describe "server started without JWT secret" $ do -- this test will stop working 9999999999s after the UNIX EPOCH diff --git a/test/Feature/NonexistentSchemaSpec.hs b/test/Feature/NonexistentSchemaSpec.hs index ed1d5dce4..7327c03cc 100644 --- a/test/Feature/NonexistentSchemaSpec.hs +++ b/test/Feature/NonexistentSchemaSpec.hs @@ -7,7 +7,7 @@ import Test.Hspec.Wai import Protolude hiding (get) -spec :: SpecWith Application +spec :: SpecWith ((), Application) spec = describe "Non existent api schema" $ do it "succeeds when requesting root path" $ diff --git a/test/Feature/PgVersion95Spec.hs b/test/Feature/PgVersion95Spec.hs index dc5cedc66..31f889234 100644 --- a/test/Feature/PgVersion95Spec.hs +++ b/test/Feature/PgVersion95Spec.hs @@ -9,7 +9,7 @@ import Test.Hspec.Wai.JSON import Protolude hiding (get) import SpecHelper -spec :: SpecWith Application +spec :: SpecWith ((), Application) spec = describe "features supported on PostgreSQL 9.5" $ context "json array negative index" $ do it "can select with negative indexes" $ do diff --git a/test/Feature/PgVersion96Spec.hs b/test/Feature/PgVersion96Spec.hs index e6a0cf596..58426e3e2 100644 --- a/test/Feature/PgVersion96Spec.hs +++ b/test/Feature/PgVersion96Spec.hs @@ -10,7 +10,7 @@ import Test.Hspec.Wai.JSON import Protolude hiding (get) import SpecHelper -spec :: SpecWith Application +spec :: SpecWith ((), Application) spec = describe "features supported on PostgreSQL 9.6" $ do context "GUC headers on function calls" $ do diff --git a/test/Feature/ProxySpec.hs b/test/Feature/ProxySpec.hs index 2077c71ae..7f3a09668 100644 --- a/test/Feature/ProxySpec.hs +++ b/test/Feature/ProxySpec.hs @@ -6,7 +6,7 @@ import Test.Hspec hiding (pendingWith) import Protolude import SpecHelper -spec :: SpecWith Application +spec :: SpecWith ((), Application) spec = describe "GET / with proxy" $ it "returns a valid openapi spec with proxy" $ diff --git a/test/Feature/QueryLimitedSpec.hs b/test/Feature/QueryLimitedSpec.hs index e5d2c9f0e..79a57e397 100644 --- a/test/Feature/QueryLimitedSpec.hs +++ b/test/Feature/QueryLimitedSpec.hs @@ -11,7 +11,7 @@ import Test.Hspec.Wai.JSON import Protolude hiding (get) import SpecHelper -spec :: SpecWith Application +spec :: SpecWith ((), Application) spec = describe "Requesting many items with server limits(max-rows) enabled" $ do it "restricts results" $ diff --git a/test/Feature/QuerySpec.hs b/test/Feature/QuerySpec.hs index a5c7ba23a..fec9b74b6 100644 --- a/test/Feature/QuerySpec.hs +++ b/test/Feature/QuerySpec.hs @@ -14,7 +14,7 @@ import PostgREST.Types (PgVersion, pgVersion112) import Protolude hiding (get) import SpecHelper -spec :: PgVersion -> SpecWith Application +spec :: PgVersion -> SpecWith ((), Application) spec actualPgVersion = do describe "Querying a table with a column called count" $ diff --git a/test/Feature/RangeSpec.hs b/test/Feature/RangeSpec.hs index 74b30ffe5..c7e2df1fd 100644 --- a/test/Feature/RangeSpec.hs +++ b/test/Feature/RangeSpec.hs @@ -19,7 +19,7 @@ defaultRange = [json| { "min": 0, "max": 15 } |] emptyRange :: BL.ByteString emptyRange = [json| { "min": 2, "max": 2 } |] -spec :: SpecWith Application +spec :: SpecWith ((), Application) spec = do describe "POST /rpc/getitemrange" $ do context "without range headers" $ do diff --git a/test/Feature/RawOutputTypesSpec.hs b/test/Feature/RawOutputTypesSpec.hs index dd99e0ad9..6975ce63c 100644 --- a/test/Feature/RawOutputTypesSpec.hs +++ b/test/Feature/RawOutputTypesSpec.hs @@ -10,7 +10,7 @@ import Test.Hspec.Wai.JSON import Protolude import SpecHelper (acceptHdrs) -spec :: SpecWith Application +spec :: SpecWith ((), Application) spec = describe "When raw-media-types config variable is missing or left empty" $ do let firefoxAcceptHdrs = acceptHdrs "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" chromeAcceptHdrs = acceptHdrs "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3" diff --git a/test/Feature/RootSpec.hs b/test/Feature/RootSpec.hs index 74fa89fb3..92721663b 100644 --- a/test/Feature/RootSpec.hs +++ b/test/Feature/RootSpec.hs @@ -11,7 +11,7 @@ import Protolude hiding (get) import SpecHelper -spec :: SpecWith Application +spec :: SpecWith ((), Application) spec = describe "root spec function" $ do it "accepts application/openapi+json" $ diff --git a/test/Feature/RpcSpec.hs b/test/Feature/RpcSpec.hs index 0fdb5aec1..ede880728 100644 --- a/test/Feature/RpcSpec.hs +++ b/test/Feature/RpcSpec.hs @@ -17,7 +17,7 @@ import PostgREST.Types (PgVersion, pgVersion100, pgVersion109, import Protolude hiding (get) import SpecHelper -spec :: PgVersion -> SpecWith Application +spec :: PgVersion -> SpecWith ((), Application) spec actualPgVersion = describe "remote procedure call" $ do context "a proc that returns a set" $ do diff --git a/test/Feature/SingularSpec.hs b/test/Feature/SingularSpec.hs index 28d5de158..b1c0d03aa 100644 --- a/test/Feature/SingularSpec.hs +++ b/test/Feature/SingularSpec.hs @@ -13,7 +13,7 @@ import Protolude hiding (get) import SpecHelper -spec :: SpecWith Application +spec :: SpecWith ((), Application) spec = describe "Requesting singular json object" $ do let pgrstObj = "application/vnd.pgrst.object+json" diff --git a/test/Feature/StructureSpec.hs b/test/Feature/StructureSpec.hs index 3825aabab..02ce083be 100644 --- a/test/Feature/StructureSpec.hs +++ b/test/Feature/StructureSpec.hs @@ -17,7 +17,7 @@ import PostgREST.Config (docsVersion) import Protolude hiding (get) import SpecHelper -spec :: SpecWith Application +spec :: SpecWith ((), Application) spec = do describe "OpenAPI" $ do diff --git a/test/Feature/UnicodeSpec.hs b/test/Feature/UnicodeSpec.hs index 7111b20a9..a3e9ce68f 100644 --- a/test/Feature/UnicodeSpec.hs +++ b/test/Feature/UnicodeSpec.hs @@ -10,7 +10,7 @@ import Test.Hspec.Wai.JSON import Protolude hiding (get) import SpecHelper -spec :: SpecWith Application +spec :: SpecWith ((), Application) spec = describe "Reading and writing to unicode schema and table names" $ it "Can read and write values" $ do diff --git a/test/Feature/UpsertSpec.hs b/test/Feature/UpsertSpec.hs index b5d2c5f6f..9c81a311a 100644 --- a/test/Feature/UpsertSpec.hs +++ b/test/Feature/UpsertSpec.hs @@ -11,7 +11,7 @@ import Text.Heredoc import Protolude hiding (get, put) import SpecHelper -spec :: SpecWith Application +spec :: SpecWith ((), Application) spec = describe "UPSERT" $ do context "with POST" $ do diff --git a/test/Main.hs b/test/Main.hs index 7ecec37cf..84cf717ea 100644 --- a/test/Main.hs +++ b/test/Main.hs @@ -65,20 +65,22 @@ main = do refDbStructure <- newIORef $ Just dbStructure - let withApp = return $ postgrest (testCfg testDbConn) refDbStructure pool getTime $ pure () - maxRowsApp = return $ postgrest (testMaxRowsCfg testDbConn) refDbStructure pool getTime $ pure () - unicodeApp = return $ postgrest (testUnicodeCfg testDbConn) refDbStructure pool getTime $ pure () - proxyApp = return $ postgrest (testProxyCfg testDbConn) refDbStructure pool getTime $ pure () - noJwtApp = return $ postgrest (testCfgNoJWT testDbConn) refDbStructure pool getTime $ pure () - binaryJwtApp = return $ postgrest (testCfgBinaryJWT testDbConn) refDbStructure pool getTime $ pure () - audJwtApp = return $ postgrest (testCfgAudienceJWT testDbConn) refDbStructure pool getTime $ pure () - asymJwkApp = return $ postgrest (testCfgAsymJWK testDbConn) refDbStructure pool getTime $ pure () - asymJwkSetApp = return $ postgrest (testCfgAsymJWKSet testDbConn) refDbStructure pool getTime $ pure () - nonexistentSchemaApp = return $ postgrest (testNonexistentSchemaCfg testDbConn) refDbStructure pool getTime $ pure () - extraSearchPathApp = return $ postgrest (testCfgExtraSearchPath testDbConn) refDbStructure pool getTime $ pure () - rootSpecApp = return $ postgrest (testCfgRootSpec testDbConn) refDbStructure pool getTime $ pure () - htmlRawOutputApp = return $ postgrest (testCfgHtmlRawOutput testDbConn) refDbStructure pool getTime $ pure () - responseHeadersApp = return $ postgrest (testCfgResponseHeaders testDbConn) refDbStructure pool getTime $ pure () + let app cfg = return ((), postgrest (cfg testDbConn) refDbStructure pool getTime $ pure ()) + + let withApp = app testCfg + maxRowsApp = app testMaxRowsCfg + unicodeApp = app testUnicodeCfg + proxyApp = app testProxyCfg + noJwtApp = app testCfgNoJWT + binaryJwtApp = app testCfgBinaryJWT + audJwtApp = app testCfgAudienceJWT + asymJwkApp = app testCfgAsymJWK + asymJwkSetApp = app testCfgAsymJWKSet + nonexistentSchemaApp = app testNonexistentSchemaCfg + extraSearchPathApp = app testCfgExtraSearchPath + rootSpecApp = app testCfgRootSpec + htmlRawOutputApp = app testCfgHtmlRawOutput + responseHeadersApp = app testCfgResponseHeaders let reset, analyze :: IO () reset = resetDb testDbConn diff --git a/test/SpecHelper.hs b/test/SpecHelper.hs index b577e2853..ab1d8519e 100644 --- a/test/SpecHelper.hs +++ b/test/SpecHelper.hs @@ -32,7 +32,7 @@ matchContentTypeJson = "Content-Type" <:> "application/json; charset=utf-8" matchContentTypeSingular :: MatchHeader matchContentTypeSingular = "Content-Type" <:> "application/vnd.pgrst.object+json; charset=utf-8" -validateOpenApiResponse :: [Header] -> WaiSession () +validateOpenApiResponse :: [Header] -> WaiSession () () validateOpenApiResponse headers = do r <- request methodGet "/" headers "" liftIO $