How to run assert on all files in a directory during testinfra test #3032
Answered
by
hunter86bg
hunter86bg
asked this question in
General
-
Hello All, does anyone know how to setup my testinfra script to check if all files in a dir are owned by root. I have been trying the following , but I can't make it work:
The file '/opt/dir/first_file' exists as the assertion error is on the for loop. Also , I was trying to enable debug, but the example in the testinfra secion is not working. |
Beta Was this translation helpful? Give feedback.
Answered by
hunter86bg
Jan 11, 2021
Replies: 1 comment
-
So far I managed to run it like this (replaced dir and filenames):
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
hunter86bg
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
So far I managed to run it like this (replaced dir and filenames):