-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make tests verbose about startup failures
In the past we've got situations when the CI integration tests reports were not extensive enough to clarify what's going on, and we were launching a full-blown debugging process just to find out that the probes were missing. To make initialization issues more visible, make integration tests verbose about them: * Introduce a HEALTHCHECK for the Collector docker image, based on the /ready Civet API. This command would be ignored on K8S, but we could use it on CI for containers filtering. * Wait for Collector container to become healthy first before proceeding with the rest of tests. This will make it immediately clear if the test is failing due to missing probes. * Make self-checks verification a hard failure. Currently, we wait for the self-checks, but do not report if they're missing. This change will make it clear if something is badly broken to the extent that we don't receive any events.
- Loading branch information
Showing
3 changed files
with
61 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/usr/bin/env bash | ||
|
||
# /ready API will return the following formatted response: | ||
# { | ||
# "collector" : { | ||
# "drops" : 0, | ||
# "events" : 9330070, | ||
# "node" : "node.name", | ||
# "preemptions" : 0 | ||
# }, | ||
# "status" : "ok" | ||
# } | ||
# | ||
# Take the status line, split it by ":" and trim spaces and quotes. | ||
STATUS=$(curl -s localhost:8080/ready | grep 'status' | awk -F ':' '{print $2}' | xargs) | ||
|
||
if [[ "${STATUS}" = "ok" ]]; then | ||
exit 0 | ||
else | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters