Skip to content

Commit

Permalink
Merge pull request #267 from buildkite-plugins/toote_fix_test
Browse files Browse the repository at this point in the history
Fix test for tester v4.1.1
  • Loading branch information
pzeballos authored Feb 17, 2024
2 parents f5abd13 + 5772182 commit 9038cac
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/command.bats
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ setup() {
export BUILDKITE_COMMAND="pwd"

stub docker \
"run -t -i --rm --init --volume $PWD:/workdir --workdir /workdir --env BUILDKITE_JOB_ID --env BUILDKITE_BUILD_ID --env BUILDKITE_AGENT_ACCESS_TOKEN '--volume' '/tmp/bin/buildkite-agent:/usr/bin/buildkite-agent' --label com.buildkite.job-id=1-2-3-4 image:tag /bin/sh -e -c 'pwd' : echo ran command in docker"
"run -t -i --rm --init --volume $PWD:/workdir --workdir /workdir --env BUILDKITE_JOB_ID --env BUILDKITE_BUILD_ID --env BUILDKITE_AGENT_ACCESS_TOKEN --volume \* --label com.buildkite.job-id=1-2-3-4 image:tag /bin/sh -e -c 'pwd' : echo ran command in docker with buildkite agent mounted at \${17}"

# only for the command to exist
stub buildkite-agent \
Expand All @@ -113,6 +113,7 @@ setup() {
assert_success
refute_output --partial "🚨 Failed to find buildkite-agent"
assert_output --partial "ran command in docker"
assert_output --partial "/bin/buildkite-agent:/usr/bin/buildkite-agent" # check agent is mounted

unstub docker
unstub buildkite-agent || true
Expand Down

0 comments on commit 9038cac

Please sign in to comment.