-
Notifications
You must be signed in to change notification settings - Fork 49
Move mock proxy test server from elastic-agent
to elastic-agent-libs
for common use
#358
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
Conversation
elastic-agent
to elastic-agent-libs
for common use
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@khushijain21, could you bring the whole proxytest
package from the agent repo? On elastic-agent/testing/proxytest
there are 2 important files which are not there, the tests for the proxy and an example of how to use it as a "cli" application.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with @AndersonQ, it's better to bring the whole package, which includes the tests.
It also makes a small change to the original code. proxy-server now writes the incoming headers first and then the status code.
This is actually a bugfix. The headers should be fully set before calling WriteHeader
. Thanks for fixing that!
done |
💚 Build Succeeded
History
|
What does this PR do?
This PR moves mock proxy server files from https://github.com/elastic/elastic-agent/blob/615190be3f6a28403883f6b4983764558173e0e7/testing/proxytest/proxytest.go
and https://github.com/elastic/elastic-agent/blob/615190be3f6a28403883f6b4983764558173e0e7/testing/proxytest/https.go
to elastic-agent-libs so that they can be used by beats as well.
It also makes a small change to the original code.
proxy-server
now writes the incoming headers first and then the status code.Why is it important?
Checklist
Related issues