Don't print sensitive fixtures on failure #8910
-
I'm using the pytest-securestore to store my integration test secrets (API keys, passwords, etc.). Secrets are stored in an AES-encrypted, version-controlled file that is decrypted by the plugin at runtime and injected into the tests that need them. This works great; however, whenever a test fails the contents of this file are printed to the console. For example, here is the (redacted) output that pytest produces on failure.
Is there an argument that I can pass to pytest to disable printing fixtures on failure? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Currently there isn't, see #8613 for a discussion on this topic and suggestions on how to workaround this. |
Beta Was this translation helpful? Give feedback.
-
Just in case someone finds this (as I did), this plugin can help: https://github.com/mganisin/pytest-mask-secrets |
Beta Was this translation helpful? Give feedback.
Currently there isn't, see #8613 for a discussion on this topic and suggestions on how to workaround this.