1
0
mirror of https://github.com/pi-hole/docker-pi-hole.git synced 2024-06-30 05:01:00 +02:00
docker-pi-hole/test/test_shellcheck.py
diginc 21eee5a0ca Shellcheck added to py.test and fixes
- Various minor quote fixes
- Optimized repeated echos into php conf for alpine
2016-10-08 14:56:06 -05:00

14 lines
456 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 . ! -path './pi-hole/*' -name '*.sh' -a ! -name 'gravity.sh' | while read file; do shellcheck $file; done;"
results = run_local(shellcheck)
print results.stdout
assert '' == results.stdout