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

feature request: ability to define a sequence of responses #165

Closed
kilianc opened this issue Apr 9, 2024 · 3 comments · Fixed by #167
Closed

feature request: ability to define a sequence of responses #165

kilianc opened this issue Apr 9, 2024 · 3 comments · Fixed by #167
Labels
enhancement New feature or request

Comments

@kilianc
Copy link

kilianc commented Apr 9, 2024

It would be very nice to pass in an array of responses to use in the imposter to control the order and kind of payload in a e2e test suite.

@joanlopez joanlopez added the enhancement New feature or request label Apr 10, 2024
@joanlopez
Copy link
Member

Hey @kilianc,

Do you mean something like what's described in #31?
See the discussion started there, and even the work another community folk started.

Perhaps a good opportunity for you to contribute? 😛
Or, at least, to help defining such feature 🙇🏻

@kilianc
Copy link
Author

kilianc commented Apr 11, 2024

I looked at #68 and the code looks fine, is there a problem with that code change if proposed again? (other than a rebase)

@joanlopez
Copy link
Member

I looked at #68 and the code looks fine, is there a problem with that code change if proposed again? (other than a rebase)

I think that code was not only missing a rebase but also had some tests failing, was arguably adding a breaking change, and the approach was probably a bit poor (you was only allowed to set different bodies, not different full responses).

What do you think about #167? Would that be enough for what you're looking for?
Take a look at the TestImposterHandler_MultipleRequests test (both cases), please.

Thanks! 🙇🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants