You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Salt command returns exit code 1 (or 2, with --retcode-passthrough) - this is expected by me, and I further analyze the validity of the result using my custom logic (find_changes, in this example).
However, Pytest does not execute my logic, as it immediately aborts the test after host.salt returns:
Is there a way to ignore or whitelist "bad" exit codes and to continue my test function?
I only found run_expect in the documentation, but would preferably continue using the Salt module.
It seems the issue is with check_output having 0 defined as its only acceptable return code:
Hi,
I wrote a test like the following:
The Salt command returns exit code 1 (or 2, with
--retcode-passthrough
) - this is expected by me, and I further analyze the validity of the result using my custom logic (find_changes
, in this example).However, Pytest does not execute my logic, as it immediately aborts the test after
host.salt
returns:Is there a way to ignore or whitelist "bad" exit codes and to continue my test function?
I only found
run_expect
in the documentation, but would preferably continue using the Salt module.It seems the issue is with
check_output
having0
defined as its only acceptable return code:pytest-testinfra/testinfra/host.py
Line 116 in 8d69308
The text was updated successfully, but these errors were encountered: