Skip to content

Commit 72865f0

Browse files
committed
add some more tests for custom image config
1 parent fe1d4b5 commit 72865f0

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

tests/run.bats

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,3 +225,22 @@ load "${BATS_PLUGIN_PATH}/load.bash"
225225

226226
unstub docker
227227
}
228+
229+
230+
@test "Shellcheck uses default image when empty string set" {
231+
export BUILDKITE_PLUGIN_SHELLCHECK_FILES_0="tests/testdata/test.sh"
232+
export BUILDKITE_PLUGIN_SHELLCHECK_IMAGE=""
233+
export BUILDKITE_PLUGIN_SHELLCHECK_VERSION="stable"
234+
235+
stub docker \
236+
"run --rm -v $PWD:/mnt --workdir /mnt koalaman/shellcheck:stable --color=always tests/testdata/test.sh : echo running shellcheck on test.sh"
237+
238+
run "$PWD/hooks/command"
239+
240+
assert_success
241+
assert_output --partial "Running shellcheck on 1 files"
242+
assert_output --partial "running shellcheck on test.sh"
243+
assert_output --partial "Files are ok"
244+
245+
unstub docker
246+
}

0 commit comments

Comments
 (0)