Welcome to mirror list, hosted at ThFree Co, Russian Federation.

test_shellcheck.py « test - github.com/pi-hole/pi-hole.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 919ad2b94091a6cc4f5a028435a763be200f183a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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