2016-10-11 06:18:05 +02:00
|
|
|
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 '''
|
2016-11-17 19:28:51 +01:00
|
|
|
shellcheck = "find . -type f \( -name 'update.sh' -o -name 'piholeDebug.sh' \) | while read file; do shellcheck \"$file\"; done;"
|
2016-10-11 06:18:05 +02:00
|
|
|
results = run_local(shellcheck)
|
|
|
|
print results.stdout
|
|
|
|
assert '' == results.stdout
|