Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add response code verification into integration DSL #104

Merged
merged 1 commit into from
Mar 22, 2019

Conversation

piotr-iohk
Copy link
Contributor

@piotr-iohk piotr-iohk commented Mar 21, 2019

Issue Number

#104

Overview

  • I have added expectResponseCode method into DSL and some temporary test on external service http://httpbin.org just to check it works. The method checks if the response has expected response code.

Comments

This expectResponseCode only works for response produced by response' method which just returns raw response in the form of Response ByteString. I kinda like it bacuase it seems you can get a response code or response body or response headers from it using different methods from Network.HTTP.Client. At this point it seems to be more versatile than response (old unsafeRequest) which contains additional logic for getting the response depending on response codes.

¯_(ツ)_/¯

Copy link
Member

@KtorZ KtorZ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Styling issues on imports, make sure the coding standards is repected.
Otherwise, LGTM and happy to merge once the imports have been fixed 👍

test/integration/Main.hs Show resolved Hide resolved
test/integration/Main.hs Outdated Show resolved Hide resolved
test/integration/Main.hs Show resolved Hide resolved
@piotr-iohk piotr-iohk force-pushed the piotr/56/qa-review-and-experiment branch from 1c503d5 to a92d273 Compare March 22, 2019 09:48
@piotr-iohk
Copy link
Contributor Author

Fixed and cleaned up the imports. 👍

@KtorZ
Copy link
Member

KtorZ commented Mar 22, 2019

Will rebase/squash and merge after #107 👍

@KtorZ KtorZ force-pushed the piotr/56/qa-review-and-experiment branch from d8217f9 to 8e5b71a Compare March 22, 2019 10:56
@KtorZ KtorZ merged commit c51903b into master Mar 22, 2019
@KtorZ KtorZ deleted the piotr/56/qa-review-and-experiment branch March 22, 2019 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants