1
0
mirror of https://github.com/pi-hole/pi-hole synced 2024-10-18 22:09:04 +00:00
pi-hole/test/test_shellcheck.py
Dan Schaper 0c2827e130
Test exclusion for sourced files SC1090.
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2017-06-24 15:49:16 -07:00

14 lines
469 B
Python

import pytest
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' -o -name 'piholeDebug.sh' \) | while read file; do shellcheck \"$file\" -e SC1090; done;"
results = run_local(shellcheck)
print results.stdout
assert '' == results.stdout