-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: add shellcheck to bats tests, fix lint
A previous test bug would have been caught by linting the bats test code, so let's do that now. That error was using an undefined variable in a test. ($last_layer_hash in atomfs.bats) It had been defined in a different test in the same file, but was undefined in the test in question. Unfortunately because of the way bats does bash, shellcheck only identifies that as an INFO level possible error SC2031. So this adds a new `lintbats` target that first checks for JUST SC2031, then checks separately for only error level issues. This commit also fixes a few error level issues in other files: - asterisk and whiteout : use glob instead of looping over ls. /shrug - bom: [ -n "${ZOT_HOST}:${ZOT_PORT}" ] will always be true because of the colon in there, so this commit eliminates the colon. - config.bats had a complaint about the indentation of the EOF because it's in yaml in another here doc? OK then. Also add the shellcheck package to the build deps. Signed-off-by: Michael McCracken <[email protected]>
- Loading branch information
1 parent
2446144
commit 15b4b28
Showing
6 changed files
with
19 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters