File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -473,3 +473,30 @@ DOCKER_STUB_DEFAULT_OPTIONS='--log-level error run --rm --volume \* --volume \*
473
473
unstub docker
474
474
rm " ${annotation_input} "
475
475
}
476
+
477
+ @test " can customize skipped tests variable" {
478
+ export BUILDKITE_PLUGIN_JUNIT_ANNOTATE_ARTIFACTS=" junits/*.xml"
479
+ export BUILDKITE_PLUGIN_JUNIT_ANNOTATE_SKIPPED_FORMAT=" whatever"
480
+
481
+ stub mktemp \
482
+ " -d \* : mkdir -p '$artifacts_tmp '; echo '$artifacts_tmp '" \
483
+ " -d \* : mkdir -p '$annotation_tmp '; echo '$annotation_tmp '"
484
+
485
+ stub buildkite-agent \
486
+ " artifact download \* \* : echo Downloaded artifact \$ 3 to \$ 4" \
487
+ " annotate --context \* --style \* : cat >'${annotation_input} '; echo Annotation added with context \$ 3 and style \$ 5, content saved"
488
+
489
+ stub docker \
490
+ " --log-level error run --rm --volume \* --volume \* --env \* --env \* --env \* --env BUILDKITE_PLUGIN_JUNIT_ANNOTATE_SKIPPED_FORMAT='whatever' \* ruby /src/bin/annotate /junits : cat tests/2-tests-1-failure.output && exit 64"
491
+
492
+ run " $PWD /hooks/command"
493
+
494
+ assert_success
495
+
496
+ assert_output --partial " Annotation added"
497
+
498
+ unstub mktemp
499
+ unstub buildkite-agent
500
+ unstub docker
501
+ rm " ${annotation_input} "
502
+ }
You can’t perform that action at this time.
0 commit comments