-
-
Notifications
You must be signed in to change notification settings - Fork 354
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ignore Salt exit codes #705
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: