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

chore(tests) replace ncat with test server #2510

Merged
merged 4 commits into from
Aug 9, 2021

Conversation

jakubdyszkiewicz
Copy link
Contributor

Summary

So far we were using netcat as our "HTTP server", but this has caused several problems with testing.
Sometimes netcat was randomly failing. One time we forgot to add content-length header to the response etc, etc.
In the end, we figured out that we should use real HTTP server that has valid RFC implementation that supports connection pooling etc.
Some time ago, @lobkovilya introduced Test Server that is just Go application that uses HTTP server.
This PR replaces all usages of ncat as a test server.

It's already hard enough to get stable E2E tests, so this PR eliminates one of the problems.

I implemented Test Server on K8S as Deployment. I would love to do the same for Universal but it requires further refactor.

Note that netcat is still used for DemoClient but it's not really used, since all the requets are made by sshing into the pod/VM and execute curls.

Documentation

  • No docs

Testing

  • Unit tests
  • E2E tests
  • Manual testing on Universal
  • Manual testing on Kubernetes

Backwards compatibility

  • Add backport-to-stable label if the code is backwards compatible. Otherwise, list breaking changes.

Signed-off-by: Jakub Dyszkiewicz <jakub.dyszkiewicz@gmail.com>
Signed-off-by: Jakub Dyszkiewicz <jakub.dyszkiewicz@gmail.com>
Signed-off-by: Jakub Dyszkiewicz <jakub.dyszkiewicz@gmail.com>
Signed-off-by: Jakub Dyszkiewicz <jakub.dyszkiewicz@gmail.com>
Copy link
Contributor

@bartsmykla bartsmykla left a comment

Choose a reason for hiding this comment

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

lgtm

@jakubdyszkiewicz jakubdyszkiewicz merged commit 7561bd0 into master Aug 9, 2021
@jakubdyszkiewicz jakubdyszkiewicz deleted the chore/test-server branch August 9, 2021 10:50
mergify bot pushed a commit that referenced this pull request Aug 9, 2021
Signed-off-by: Jakub Dyszkiewicz <jakub.dyszkiewicz@gmail.com>
(cherry picked from commit 7561bd0)
jakubdyszkiewicz pushed a commit that referenced this pull request Aug 10, 2021
Signed-off-by: Jakub Dyszkiewicz <jakub.dyszkiewicz@gmail.com>
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

2 participants