2016-10-11 06:18:05 +02:00
|
|
|
import testinfra
|
|
|
|
|
|
|
|
run_local = testinfra.get_backend(
|
|
|
|
"local://"
|
|
|
|
).get_module("Command").run
|
|
|
|
|
2018-07-02 22:54:19 +02:00
|
|
|
|
2016-10-11 06:18:05 +02:00
|
|
|
def test_scripts_pass_shellcheck():
|
2018-07-03 08:05:24 +02:00
|
|
|
'''
|
|
|
|
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;")
|
2016-10-11 06:18:05 +02:00
|
|
|
results = run_local(shellcheck)
|
|
|
|
print results.stdout
|
|
|
|
assert '' == results.stdout
|