From 8c2b6f117b4974b98e962d990dfa1c236cf02f49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C3=ADas=20A=2E=20Bellone?= Date: Sun, 19 Mar 2023 12:23:57 -0300 Subject: [PATCH 1/2] Corrected follow-symlink variable option --- hooks/pre-exit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hooks/pre-exit b/hooks/pre-exit index f585529..ae7c2e5 100755 --- a/hooks/pre-exit +++ b/hooks/pre-exit @@ -95,7 +95,7 @@ fi FIND_CMD=(find) -if [[ "${BUILDKITE_PLUGIN_TEST_COLLECTOR_FOLLOW_LINKS:-}" =~ ^(true|on|1|always)$ ]]; then +if [[ "${BUILDKITE_PLUGIN_TEST_COLLECTOR_FOLLOW_SYMLINKS:-}" =~ ^(true|on|1|always)$ ]]; then FIND_CMD+=('-L') fi From ab4a375a8cb4f9e0f617be92b3f676f6b2f2da74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C3=ADas=20A=2E=20Bellone?= Date: Sun, 19 Mar 2023 12:24:12 -0300 Subject: [PATCH 2/2] Correct tests to use the correct environment variable --- tests/pre-exit-success.bats | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/pre-exit-success.bats b/tests/pre-exit-success.bats index 72344da..2d27772 100644 --- a/tests/pre-exit-success.bats +++ b/tests/pre-exit-success.bats @@ -124,7 +124,7 @@ COMMON_CURL_OPTIONS='--form \* --form \* --form \* --form \* --form \* --form \* } @test "Follow links option enabled adds find option" { - export BUILDKITE_PLUGIN_TEST_COLLECTOR_FOLLOW_LINKS='true' + export BUILDKITE_PLUGIN_TEST_COLLECTOR_FOLLOW_SYMLINKS='true' stub find "-L . -path \* : echo './tests/fixtures/junit-1.xml'" stub curl "-X POST --silent --show-error --max-time 30 --form format=junit ${COMMON_CURL_OPTIONS} \* -H \* : echo 'curl success'" @@ -139,7 +139,7 @@ COMMON_CURL_OPTIONS='--form \* --form \* --form \* --form \* --form \* --form \* } @test "Follow links option disabled does not add find option" { - export BUILDKITE_PLUGIN_TEST_COLLECTOR_FOLLOW_LINKS='false' + export BUILDKITE_PLUGIN_TEST_COLLECTOR_FOLLOW_SYMLINKS='false' stub find ". -path \* : echo './tests/fixtures/junit-1.xml'" stub curl "-X POST --silent --show-error --max-time 30 --form format=junit ${COMMON_CURL_OPTIONS} \* -H \* : echo 'curl success'"