mirror of
https://github.com/containers/podman.git
synced 2025-06-25 20:26:51 +08:00
[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:
2
Makefile
2
Makefile
@ -607,7 +607,7 @@ tests-included:
|
|||||||
|
|
||||||
.PHONY: tests-expect-exit
|
.PHONY: tests-expect-exit
|
||||||
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 "^^^ Unhelpful use of Expect(ExitCode())"; \
|
||||||
echo " Please use '.Should(Exit(...))' pattern instead."; \
|
echo " Please use '.Should(Exit(...))' pattern instead."; \
|
||||||
echo " If that's not possible, please add an annotation (description) to your assertion:"; \
|
echo " If that's not possible, please add an annotation (description) to your assertion:"; \
|
||||||
|
Reference in New Issue
Block a user