Skip to content

Commit 5221000

Browse files
committed
Added tests for the new option
1 parent 35f0ac6 commit 5221000

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

tests/command.bats

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,22 @@ setup() {
4848
unstub docker
4949
}
5050

51+
52+
@test "Supports the skip-invalid option" {
53+
export BUILDKITE_PLUGIN_PLUGIN_LINTER_SKIP_INVALID=true
54+
55+
stub docker \
56+
"pull buildkite/plugin-linter:latest : echo pulled image" \
57+
"run -it --rm --volume /plugin:/plugin:ro --env PLUGIN_ID=my-plugin --env PLUGIN_SKIP_INVALID=true buildkite/plugin-linter:latest : echo linted"
58+
59+
run "$PWD"/hooks/command
60+
61+
assert_success
62+
assert_output --partial "pulled image"
63+
assert_output --partial "linted"
64+
unstub docker
65+
}
66+
5167
@test "Support not specifying a tag" {
5268
unset BUILDKITE_PLUGIN_PLUGIN_LINTER_IMAGE_VERSION
5369

0 commit comments

Comments
 (0)