1
0
mirror of https://github.com/pi-hole/pi-hole synced 2024-11-16 04:59:23 +00:00
pi-hole/test/test_shellcheck.py
bcambl 79232d02c9 python linting: 'pytest' imported but unused (F401)
Signed-off-by: bcambl <blayne@blaynecampbell.com>
2018-07-03 00:30:00 -06:00

19 lines
507 B
Python

import testinfra
run_local = testinfra.get_backend(
"local://"
).get_module("Command").run
def test_scripts_pass_shellcheck():
'''
Make sure shellcheck does not find anything wrong with our shell scripts
'''
shellcheck = ("find . -type f -name 'update.sh' "
"| while read file; do "
"shellcheck -x \"$file\" -e SC1090,SC1091; "
"done;")
results = run_local(shellcheck)
print results.stdout
assert '' == results.stdout