@@ -18,6 +18,7 @@ setup() {
1818 export BUILDKITE_BRANCH=" a-branch"
1919 export BUILDKITE_COMMIT=" a-commit"
2020 export BUILDKITE_BUILD_NUMBER=" 123"
21+ export BUILDKITE_LABEL=" A test step"
2122 export BUILDKITE_JOB_ID=" 321"
2223 export BUILDKITE_MESSAGE=" A message"
2324 export BUILDKITE_PLUGIN_TEST_COLLECTOR_ANNOTATION_LINK=" true"
@@ -28,8 +29,8 @@ COMMON_CURL_OPTIONS='--form \* --form \* --form \* --form \* --form \* --form \*
2829
2930@test " Annotates report link with jq" {
3031 stub curl " -X POST --silent --show-error --max-time 30 --form format=junit ${COMMON_CURL_OPTIONS} \* \* \* -H \* : echo 'curl success'"
31- stub buildkite-agent " annotate --style info --context \" test-collector\" : echo 'annotation success'"
32-
32+ stub buildkite-agent " annotate --style info --context \" test-collector\" --append : echo 'annotation success'"
33+
3334 run " $PWD /hooks/pre-exit"
3435
3536 assert_success
@@ -44,9 +45,9 @@ COMMON_CURL_OPTIONS='--form \* --form \* --form \* --form \* --form \* --form \*
4445
4546@test " Annotates report link without jq" {
4647 stub curl " -X POST --silent --show-error --max-time 30 --form format=junit ${COMMON_CURL_OPTIONS} \* \* \* -H \* : echo 'curl success'"
47- stub buildkite-agent " annotate --style info --context \" test-collector\" : echo 'annotation success'"
48+ stub buildkite-agent " annotate --style info --context \" test-collector\" --append : echo 'annotation success'"
4849 stub which " jq : exit 1"
49-
50+
5051 run " $PWD /hooks/pre-exit"
5152
5253 assert_success
@@ -67,8 +68,8 @@ COMMON_CURL_OPTIONS='--form \* --form \* --form \* --form \* --form \* --form \*
6768 " -X POST --silent --show-error --max-time 30 --form format=junit ${COMMON_CURL_OPTIONS} \* \* \* -H \* : echo 'curl success 1'" \
6869 " -X POST --silent --show-error --max-time 30 --form format=junit ${COMMON_CURL_OPTIONS} \* \* \* -H \* : echo 'curl success 2'" \
6970 " -X POST --silent --show-error --max-time 30 --form format=junit ${COMMON_CURL_OPTIONS} \* \* \* -H \* : echo 'curl success 3'"
70- stub buildkite-agent " annotate --style info --context \" test-collector\" : echo 'annotation success'"
71-
71+ stub buildkite-agent " annotate --style info --context \" test-collector\" --append : echo 'annotation success'"
72+
7273
7374 run " $PWD /hooks/pre-exit"
7475
@@ -96,8 +97,8 @@ COMMON_CURL_OPTIONS='--form \* --form \* --form \* --form \* --form \* --form \*
9697 " -r '.run_url' \* : echo https://buildkite.com/organizations/example/analytics/suites/collector-test/runs/1" \
9798 " -r '.run_url' \* : echo https://buildkite.com/organizations/example/analytics/suites/collector-test/runs/2" \
9899 " -r '.run_url' \* : echo https://buildkite.com/organizations/example/analytics/suites/collector-test/runs/1"
99- stub buildkite-agent " annotate --style info --context \" test-collector\" : echo 'annotation success' with stdin:; cat"
100-
100+ stub buildkite-agent " annotate --style info --context \" test-collector\" --append : echo 'annotation success' with stdin:; cat"
101+
101102
102103 run " $PWD /hooks/pre-exit"
103104
@@ -119,8 +120,8 @@ COMMON_CURL_OPTIONS='--form \* --form \* --form \* --form \* --form \* --form \*
119120@test " Annotates report link absorbs empty file error" {
120121 export CURL_RESP_FILE=" response.json"
121122 stub curl " -X POST --silent --show-error --max-time 30 --form format=junit ${COMMON_CURL_OPTIONS} \* \* \* -H \* : echo 'curl success'"
122- stub buildkite-agent " annotate --style info --context \" test-collector\" : echo 'annotation success'"
123-
123+ stub buildkite-agent " annotate --style info --context \" test-collector\" --append : echo 'annotation success'"
124+
124125 run " $PWD /hooks/pre-exit"
125126
126127 assert_success
@@ -134,7 +135,7 @@ COMMON_CURL_OPTIONS='--form \* --form \* --form \* --form \* --form \* --form \*
134135@test " No annotation when url property on json response is missing" {
135136 export CURL_RESP_FILE=" ./tests/fixtures/response_no_url.json"
136137 stub curl " -X POST --silent --show-error --max-time 30 --form format=junit ${COMMON_CURL_OPTIONS} \* \* \* -H \* : echo 'curl success'"
137-
138+
138139 run " $PWD /hooks/pre-exit"
139140
140141 assert_success
0 commit comments