[haskell-http-client] Allow logger selection via cabal flags. Emit Consumes */* for requestBody when not specified

[haskell-http-client] Allow logger selection via cabal flags. Emit Consumes */* for requestBody when not specified
This commit is contained in:
Jon Schoning
2019-02-28 13:04:50 -06:00
committed by GitHub
parent 84b99fea54
commit c30a21ac3c
85 changed files with 5585 additions and 5072 deletions

View File

@@ -2,7 +2,7 @@
--
-- see: https://github.com/sol/hpack
--
-- hash: 57ad4f3a6a440d73d378f5bad716416c24560afac10b43279041e1c7c4eaf6ca
-- hash: 9f6dec7b59478ee624f9b1fb2b1a252492dac3fc69ab92c356ac996357dbad2c
name: openapi-petstore-tests-integration
version: 0.1.0.0
@@ -22,6 +22,8 @@ extra-source-files:
test-suite tests
type: exitcode-stdio-1.0
main-is: Test.hs
other-modules:
Paths_openapi_petstore_tests_integration
hs-source-dirs:
tests
ghc-options: -Wall -fno-warn-orphans
@@ -35,11 +37,11 @@ test-suite tests
, containers
, exceptions >=0.4
, hspec >=1.8
, http-api-data >=0.3.4 && <0.4
, http-api-data >=0.3.4 && <0.5
, http-client >=0.5 && <0.6
, http-client-tls
, http-media >=0.4 && <0.8
, http-types >=0.8 && <0.10
, http-types >=0.8 && <0.13
, iso8601-time
, microlens >=0.4.3 && <0.5
, mtl >=2.2.1
@@ -51,6 +53,4 @@ test-suite tests
, transformers >=0.4.0.0
, unordered-containers
, vector >=0.10.9 && <0.13
other-modules:
Paths_openapi_petstore_tests_integration
default-language: Haskell2010

View File

@@ -18,13 +18,13 @@ dependencies:
- transformers >=0.4.0.0
- mtl >=2.2.1
- unordered-containers
- containers >=0.5.0.0 && <0.6
- containers >=0.5.0.0 && <0.7
- aeson >=1.0 && <2.0
- bytestring >=0.10.0 && <0.11
- http-types >=0.8 && <0.10
- http-types >=0.8 && <0.13
- http-client >=0.5 && <0.6
- http-client-tls
- http-api-data >= 0.3.4 && <0.4
- http-api-data >= 0.3.4 && <0.5
- http-media >= 0.4 && < 0.8
- text >=0.11 && <1.3
- time >=1.5 && <1.9

View File

@@ -1,4 +1,4 @@
resolver: lts-10.10
resolver: lts-13.9
packages:
- location: '.'
- location: '..'

View File

@@ -164,8 +164,6 @@ testPetOps mgr config =
-- * STORE TESTS
instance S.Consumes S.PlaceOrder S.MimeJSON
testStoreOps :: NH.Manager -> S.OpenAPIPetstoreConfig -> Spec
testStoreOps mgr config = do
@@ -222,11 +220,6 @@ testStoreOps mgr config = do
-- * USER TESTS
instance S.Consumes S.CreateUser S.MimeJSON
instance S.Consumes S.CreateUsersWithArrayInput S.MimeJSON
instance S.Consumes S.CreateUsersWithListInput S.MimeJSON
instance S.Consumes S.UpdateUser S.MimeJSON
testUserOps :: NH.Manager -> S.OpenAPIPetstoreConfig -> Spec
testUserOps mgr config = do
@@ -257,13 +250,13 @@ testUserOps mgr config = do
before (pure _users) $
it "createUsersWithArrayInput" $ \users -> do
let createUsersWithArrayInputRequest = S.createUsersWithArrayInput (S.ContentType S.MimeJSON) (S.User2 users)
let createUsersWithArrayInputRequest = S.createUsersWithArrayInput (S.ContentType S.MimeJSON) (S.Body users)
createUsersWithArrayInputResult <- S.dispatchLbs mgr config createUsersWithArrayInputRequest
NH.responseStatus createUsersWithArrayInputResult `shouldBe` NH.status200
before (pure _users) $
it "createUsersWithListInput" $ \users -> do
let createUsersWithListInputRequest = S.createUsersWithListInput (S.ContentType S.MimeJSON) (S.User2 users)
let createUsersWithListInputRequest = S.createUsersWithListInput (S.ContentType S.MimeJSON) (S.Body users)
createUsersWithListInputResult <- S.dispatchLbs mgr config createUsersWithListInputRequest
NH.responseStatus createUsersWithListInputResult `shouldBe` NH.status200