diff options
author | Abhijeet Kasurde <akasurde@redhat.com> | 2024-08-01 21:08:11 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-01 21:08:11 +0200 |
commit | 31ad786de168d55b7a2b20b5468e2d3f965b4021 (patch) | |
tree | 214b7bc0a6963993e729bcb1119c92b4a35749f8 /test/integration/targets | |
parent | Add UID and GID min/max keys (#81770) (diff) | |
download | ansible-31ad786de168d55b7a2b20b5468e2d3f965b4021.tar.xz ansible-31ad786de168d55b7a2b20b5468e2d3f965b4021.zip |
ansible-doc: handle on_fail (#83676)
Handle errors raised when role doc has errors
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
Diffstat (limited to 'test/integration/targets')
-rwxr-xr-x | test/integration/targets/ansible-doc/runme.sh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/integration/targets/ansible-doc/runme.sh b/test/integration/targets/ansible-doc/runme.sh index 80149d708d..f7accb217c 100755 --- a/test/integration/targets/ansible-doc/runme.sh +++ b/test/integration/targets/ansible-doc/runme.sh @@ -208,6 +208,12 @@ ANSIBLE_LIBRARY='./nolibrary' ansible-doc --metadata-dump --no-fail-on-errors -- output=$(ANSIBLE_LIBRARY='./nolibrary' ansible-doc --metadata-dump --playbook-dir broken-docs testns.testcol 2>&1 | grep -c 'ERROR!' || true) test "${output}" -eq 1 +# ensure that role doc does not fail when --no-fail-on-errors is supplied +ANSIBLE_LIBRARY='./nolibrary' ansible-doc --no-fail-on-errors --playbook-dir broken-docs testns.testcol.testrole -t role 1>/dev/null 2>&1 + +# ensure that role doc does fail when --no-fail-on-errors is not supplied +output=$(ANSIBLE_LIBRARY='./nolibrary' ansible-doc --playbook-dir broken-docs testns.testcol.testrole -t role 2>&1 | grep -c 'ERROR!' || true) +test "${output}" -eq 1 echo "testing legacy plugin listing" [ "$(ansible-doc -M ./library -l ansible.legacy |wc -l)" -gt "0" ] |