-
Notifications
You must be signed in to change notification settings - Fork 327
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(test) add test for HealthCheck policy #1987
Conversation
Signed-off-by: Ilya Lobkov <ilya.lobkov@konghq.com>
Signed-off-by: Ilya Lobkov <ilya.lobkov@konghq.com>
Signed-off-by: Ilya Lobkov <ilya.lobkov@konghq.com>
Signed-off-by: Ilya Lobkov <ilya.lobkov@konghq.com>
Signed-off-by: Ilya Lobkov <ilya.lobkov@konghq.com>
Signed-off-by: Ilya Lobkov <ilya.lobkov@konghq.com>
Signed-off-by: Ilya Lobkov <ilya.lobkov@konghq.com>
Signed-off-by: Ilya Lobkov <ilya.lobkov@konghq.com>
Signed-off-by: Ilya Lobkov <ilya.lobkov@konghq.com>
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'm ok with idea of having separate targets
Signed-off-by: Ilya Lobkov <ilya.lobkov@konghq.com>
Signed-off-by: Ilya Lobkov <ilya.lobkov@konghq.com>
Signed-off-by: Ilya Lobkov <ilya.lobkov@konghq.com>
Signed-off-by: Ilya Lobkov <ilya.lobkov@konghq.com>
Signed-off-by: Ilya Lobkov <ilya.lobkov@konghq.com>
Signed-off-by: Ilya Lobkov <ilya.lobkov@konghq.com>
Signed-off-by: Ilya Lobkov <ilya.lobkov@konghq.com>
Signed-off-by: Ilya Lobkov <ilya.lobkov@konghq.com>
Signed-off-by: Ilya Lobkov <ilya.lobkov@konghq.com>
// wait cluster 'test-server' to be marked as unhealthy | ||
Eventually(func() bool { | ||
cmd := []string{"/bin/bash", "-c", "\"curl localhost:30001/clusters | grep test-server\""} | ||
stdout, _, err := cluster.ExecWithRetries("", "", "dp-demo-client", cmd...) |
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.
maybe just Exec? Do we need retries on top of retries?
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.
Technically these are different retries: ExecWithRetries
will retry if you failed to exec cmd
, ssh problem, or something like that, whereas Eventually
waits correct response from localhost:30001/clusters
Signed-off-by: Ilya Lobkov <ilya.lobkov@konghq.com>
Summary
Besides the test current PR introduces a new binary
test-server
. It's built usingcobra
so could be easily extended for other purposes. Now it has only one command:which runs a server that can respond to health checker messages over TCP.
This binary is embedded into
kuma-universal
image. I don't think we have to build it (andkuma-universal
as well) when running general targets. So the targets like:make build
make images
make docker/build
make docker/load
make docker/save
should not build auxiliary binaries and images that are needed only for testing. Probably we have to create separate targets for all binaries that we're not shipping like
make test/build
,make test/images
, or something like this. Right now I just explicitly callmake docker/build/kuma-universal
where needed.Maybe there are should be 2 types of targets:
And the general target for all
build: release/build test/build
@kumahq/kuma-maintainers what do you think?
Full changelog
test-server
Issues resolved
Fix #XXX
Documentation