Skip to content

Commit

Permalink
Merge pull request #45 from buildkite-plugins/toote_symlink_fix
Browse files Browse the repository at this point in the history
Follow symlink feature fix
  • Loading branch information
pzeballos authored Mar 21, 2023
2 parents f753eb1 + ab4a375 commit 6581c4e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion hooks/pre-exit
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions tests/pre-exit-success.bats
Original file line number Diff line number Diff line change
Expand Up @@ -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'"
Expand All @@ -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'"
Expand Down

0 comments on commit 6581c4e

Please sign in to comment.