-
Notifications
You must be signed in to change notification settings - Fork 5
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
Ersatz proxy support in 3.x #167
Comments
I'll see what I can do. |
Actually, it was basically a stand-alone component anyway, it should not be a big deal to rebuild it. I will add it to the next release. If I can pull together some time, I will see if I can cut a release within a month or two. |
Thank you. Really appreciate the work you do with this library. |
Just curious, is is this an open source project, or would you be interested in building off a branch and trying it out when it's ready? |
It's not an open source project unfortunately but I would be happy to build off a branch and try it out internally. |
I had an idea for what I feel is a better version of the old proxy server, and I'd like to see if it would satisfy your use case. I am adding a "forwarding" feature as a new type of response provider in the main expectations API, so that you could configure something like the following: ersatz.expectations(expect -> {
expect.GET("/some/path", req -> {
// optional request matching
req.forward("http://someother:1234");
});
}); which would forward the request to the provided host/port and then return its response as the returned response. To me this seems like it would accomplish the same thing as the old proxy, but you'd also get the request matching for free. Is there something in your case that I am misunderstanding? Note: if its a matter of changing a lot of test config - I could bring back the old style as well for a release (deprecated) so that you'd have time to change things over. I am more interested in whether this idea can eventually replace it. |
@radarsh You can checkout the Unless you find anything, I will plan on cutting the 3.2 release sometime next week. |
This has been added to release 3.2, which will be released on Monday. |
The 3.2 release has been published to the maven central repo - it may take some time to fully propagate. |
I have been a long time user of this library and now I am looking at migrating from 1.9.x to the latest 3.x version. The main blocker preventing me from doing so is the lack of support for ErsatzProxy. Granted, I don't have as many tests utilising ErsatzProxy as I have using ErsatzServer but those handful of tests are still important for my application as they test that code processes proxy settings correctly and that the actual proxied endpoint is invoked.
The code that is being tested using ErsatzProxy is being relied on by hundreds of developers in a large enterprise which in turn is used to develop products that affects millions of users globally, in case you were wondering about the appetite.
I am basically coming to this issue from https://cjstehno.github.io/ersatz/docs/user_guide.html#_migrating_to_3_0 where you asked us to show interest in the form of an issue or discussion.
So, can we please have it back in 3.x? Thanks.
The text was updated successfully, but these errors were encountered: