Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: Avoid spamming logs in monitor aggreg test
The monitor aggregation tests are currently spamming the logs because they dump useless matches from regular expressions. Let's remove that. Most of the log spam comes from the use of %+v to dump the regexp matches. That doesn't even work properly and ends up dumping a huge matrix of integers. Given we retry this step until it eventually succeeds, this can add up to several megabytes of logs. In addition to removing this dump of the regexp matches, we also switch the checkMonitorOutput function to return an error instead of a boolean. The consequence of that change is that the Eventually block will display the actual error message from checkMonitorOutput on failure. The test logs won't contain one error message (GinkgoPrint) per failure, but only the last error message we got before timing out. I believe that's what we want because: 1) it surfaces the actual error in the ginkgo results instead of telling us "expected true, got false" (duh!) and (2) in logs, we only care about the last error message. Signed-off-by: Paul Chaignon <paul@cilium.io>
- Loading branch information