shellcheck improvements for bats tests
This commit is contained in:
parent
e5997400cd
commit
e1208ed2b8
10
README.md
10
README.md
|
@ -63,6 +63,16 @@ the *test* provision :
|
|||
vagrant provision --provision-with test
|
||||
~~~
|
||||
|
||||
You can also run the tests from inside the VM
|
||||
|
||||
~~~
|
||||
localhost $ vagrant ssh test
|
||||
vagrant@test $ sudo -i
|
||||
root@test # bats /vagrant/test/*.bats
|
||||
~~~
|
||||
|
||||
You should shellcheck your bats files, but with shellcheck > 0.4.6, because the 0.4.0 version doesn't support bats syntax.
|
||||
|
||||
## Usage
|
||||
|
||||
See [docs/usage.md](docs/usage.md).
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#!/usr/bin/env bats
|
||||
# shellcheck disable=SC1089,SC1083,SC2154
|
||||
|
||||
load test_helper
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#!/usr/bin/env bats
|
||||
# shellcheck disable=SC1089,SC1083,SC2154
|
||||
|
||||
load test_helper
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#!/usr/bin/env bats
|
||||
# shellcheck disable=SC1089,SC1083,SC2154
|
||||
|
||||
load test_helper
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#!/usr/bin/env bats
|
||||
# shellcheck disable=SC1089,SC1083,SC2154
|
||||
|
||||
load test_helper
|
||||
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
# shellcheck disable=SC2154 shell=bash
|
||||
|
||||
# shellcheck disable=SC2034
|
||||
setup() {
|
||||
. /usr/lib/bkctld/includes
|
||||
|
||||
|
@ -121,6 +123,7 @@ refute_line() {
|
|||
fi
|
||||
}
|
||||
|
||||
# shellcheck disable=SC2145
|
||||
assert() {
|
||||
if ! "$@"; then
|
||||
flunk "failed: $@"
|
||||
|
|
Loading…
Reference in New Issue