[CI:DOCS] tests-expect-exit: include source line numbers

In the new check for preventing 'Expect(ExitCode...)',
include source line numbers.

Response to #11034, which I totally didn't even understand
because it was referencing a different test. Sorry, Brent.

Signed-off-by: Ed Santiago <santiago@redhat.com>
This commit is contained in:
Ed Santiago
2021-08-04 15:21:39 -06:00
parent 117583c293
commit c9e2f2f60b

View File

@ -607,7 +607,7 @@ tests-included:
.PHONY: tests-expect-exit
tests-expect-exit:
@if egrep 'Expect.*ExitCode' test/e2e/*.go | egrep -v ', ".*"\)'; then \
@if egrep --line-number 'Expect.*ExitCode' test/e2e/*.go | egrep -v ', ".*"\)'; then \
echo "^^^ Unhelpful use of Expect(ExitCode())"; \
echo " Please use '.Should(Exit(...))' pattern instead."; \
echo " If that's not possible, please add an annotation (description) to your assertion:"; \