ci: Fix FilterLine test matchers and related specs#11794
ci: Fix FilterLine test matchers and related specs#11794nebril merged 1 commit intocilium:masterfrom
Conversation
Current matchers implementation makes policy related specs always pass even when value is present in the output. This patch updates ExpectContainsFilterLine and ExpectDoesNotContainFilterLine matchers to match expected value against string slice rather than slice of FilterBuffer. This patch also updates policy specs to use ExpectContainsFilterLine matcher where applicable. Minor consistency changes were also added to policy specs. Signed-off-by: Arthur Evstifeev <aevstifeev@gitlab.com>
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Good catch, thank you!
I used WaitUntilMatchFilterLine instead of ExpectContainsFilterLine to check for the subsequent events because (in theory) they might not have been captured yet at the time of check. However, considering that the time window between the first and second event is in the order of microseconds and the fact that the old monitor based tests didn't seem to have the issue either, I'm happy to simplify the tests again.
|
test-me-please Edit: Known flakes unrelated to the PR (both in K8s, this PR touches Runtime). |
|
@gandro I have reversed matchers a bit in egress test (wait on |
Oh, I did not catch that! Even better then, thank you! |
|
retest-4.9 (edit: note, this should have been 4.19) |
|
retest-net-next |
|
retest-4.19 |
|
net-next failed on unrelated flake, merging |
1 similar comment
|
net-next failed on unrelated flake, merging |
|
Looks like this never made it into the v1.8 branch. But we are using it in some Hubble tests (e.g. regression test) that we sometimes backport along with bug fixes. Marking for backport. |
Current matchers implementation makes policy related specs always pass
even when value is present in the output. This patch updates
ExpectContainsFilterLine and ExpectDoesNotContainFilterLine matchers
to match expected value against string slice rather than slice of
FilterBuffer. This patch also updates policy specs to use
ExpectContainsFilterLine matcher where applicable. Minor consistency
changes were also added to policy specs.