curl-runnings 0.14.0 → 0.15.0
raw patch · 3 files changed
+16/−14 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ Testing.CurlRunnings.Types: [allowedRedirects] :: CurlCase -> Maybe Int
- Testing.CurlRunnings.Types: CurlCase :: Text -> Text -> HttpMethod -> Maybe Payload -> Maybe KeyValuePairs -> Maybe Headers -> Maybe Authentication -> Maybe JsonMatcher -> StatusCodeMatcher -> Maybe HeaderMatcher -> CurlCase
+ Testing.CurlRunnings.Types: CurlCase :: Text -> Text -> HttpMethod -> Maybe Payload -> Maybe KeyValuePairs -> Maybe Headers -> Maybe Authentication -> Maybe JsonMatcher -> StatusCodeMatcher -> Maybe HeaderMatcher -> Maybe Int -> CurlCase
Files
- curl-runnings.cabal +3/−3
- src/Testing/CurlRunnings.hs +2/−1
- src/Testing/CurlRunnings/Types.hs +11/−10
curl-runnings.cabal view
@@ -1,13 +1,13 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.31.2.+-- This file has been generated from package.yaml by hpack version 0.33.0. -- -- see: https://github.com/sol/hpack ----- hash: 106956606cfa1021bef8fdaaf6857a97c370bec27c29438f6216440f1309b480+-- hash: fa38d9aa3670cced2c7c5d811b17d2c7e74c4f05119c7090c2fedbffc4ce33b1 name: curl-runnings-version: 0.14.0+version: 0.15.0 synopsis: A framework for declaratively writing curl based API tests description: Please see the README on Github at <https://github.com/aviaviavi/curl-runnings#readme> category: Testing
src/Testing/CurlRunnings.hs view
@@ -116,7 +116,8 @@ setRequestHeaders (toHTTPHeaders interpolatedHeaders) . appendQueryParameters interpolatedQueryParams . (if tlsCheckType == DoTLSCheck then id else (setRequestManager manager)) $- initReq {method = B8S.pack . show $ requestMethod curlCase}+ initReq { method = B8S.pack . show $ requestMethod curlCase+ , redirectCount = fromMaybe 10 (allowedRedirects curlCase) } logger state DEBUG (pShow request) logger state
src/Testing/CurlRunnings/Types.hs view
@@ -209,16 +209,17 @@ -- | A single curl test case, the basic foundation of a curl-runnings test. data CurlCase = CurlCase- { name :: T.Text -- ^ The name of the test case- , url :: T.Text -- ^ The target url to test- , requestMethod :: HttpMethod -- ^ Verb to use for the request- , requestData :: Maybe Payload -- ^ Payload to send with the request, if any- , queryParameters :: Maybe KeyValuePairs -- ^ Query parameters to set in the request, if any- , headers :: Maybe Headers -- ^ Headers to send with the request, if any- , auth :: Maybe Authentication -- ^ Authentication to add to the request, if any- , expectData :: Maybe JsonMatcher -- ^ The assertions to make on the response payload, if any- , expectStatus :: StatusCodeMatcher -- ^ Assertion about the status code returned by the target- , expectHeaders :: Maybe HeaderMatcher -- ^ Assertions to make about the response headers, if any+ { name :: T.Text -- ^ The name of the test case+ , url :: T.Text -- ^ The target url to test+ , requestMethod :: HttpMethod -- ^ Verb to use for the request+ , requestData :: Maybe Payload -- ^ Payload to send with the request, if any+ , queryParameters :: Maybe KeyValuePairs -- ^ Query parameters to set in the request, if any+ , headers :: Maybe Headers -- ^ Headers to send with the request, if any+ , auth :: Maybe Authentication -- ^ Authentication to add to the request, if any+ , expectData :: Maybe JsonMatcher -- ^ The assertions to make on the response payload, if any+ , expectStatus :: StatusCodeMatcher -- ^ Assertion about the status code returned by the target+ , expectHeaders :: Maybe HeaderMatcher -- ^ Assertions to make about the response headers, if any+ , allowedRedirects :: Maybe Int -- ^ Number of redirects to follow. Defaults to 10 } deriving (Show, Generic) instance FromJSON CurlCase