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

Dynamic token replacement in stubbed response has been applied for re… #63

Merged
merged 2 commits into from
Nov 30, 2016

Conversation

dzmitryh
Copy link
Contributor

…sponse headers as well.

Hi There,

Yesterday faced with issue when I can't use token replacement in response headers. So for example I can't define regex group somewhere in request and then use it in response header like "location" but only in response body. So decided to fix it. Please advise in case of any concerns how to do it in the best way.

Thanks, Dzmitry.

@codecov-io
Copy link

codecov-io commented Nov 23, 2016

Current coverage is 98.91% (diff: 100%)

Merging #63 into master will increase coverage by <.01%

@@             master        #63   diff @@
==========================================
  Files            38         38          
  Lines          1012       1015     +3   
  Methods           0          0          
  Messages          0          0          
  Branches        170        171     +1   
==========================================
+ Hits           1001       1004     +3   
  Misses            8          8          
  Partials          3          3          

Powered by Codecov. Last update 04a2a0b...660932c

@azagniotov
Copy link
Owner

Hi @dzmitryh ,
Thank you for your PR. That's pretty much the right place to do it. I do have a request for you before I merge it, would you be able to add a unit test for this use case? You can add the test(s) in unit/java/io/github/azagniotov/stubby4j/yaml/stubs/StubResponseTest.java

@dzmitryh
Copy link
Contributor Author

dzmitryh commented Nov 27, 2016

Hi @azagniotov,

Thanks for letting me know about that!
I've added test to verify that scenario. Please check it out.

Thanks, Dima.

@azagniotov azagniotov merged commit 03245d2 into azagniotov:master Nov 30, 2016
@azagniotov
Copy link
Owner

Awesome, thanks @dzmitryh !

@azagniotov
Copy link
Owner

Dima, just FYI - did a very very minor code cleanup in the areas where you touched the code, just some cosmetic refactoring.

@dzmitryh
Copy link
Contributor Author

@azagniotov cool. Thanks so much!

@azagniotov
Copy link
Owner

@dzmitryh I just released version 4.0.5 (wait for Maven sync), in other words: your feature went live.

@dzmitryh
Copy link
Contributor Author

dzmitryh commented Dec 30, 2016 via email

@azagniotov
Copy link
Owner

Thank you! S Novim Nastupayushim Godom!

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.

None yet

3 participants