Skip to content

Commit

Permalink
remove unnecessary setup_file, order env vars in test
Browse files Browse the repository at this point in the history
  • Loading branch information
francoiscampbell committed Mar 6, 2023
1 parent f7909e6 commit 9eac919
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
4 changes: 0 additions & 4 deletions tests/push.bats
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ load '../lib/shared'
# export BUILDKITE_AGENT_STUB_DEBUG=/dev/tty
# export BATS_MOCK_TMPDIR=$PWD

setup_file() {
export BUILDKITE_PLUGIN_DOCKER_COMPOSE_RUN_LABELS="false"
}

@test "Push a single service with an image in it's config" {
export BUILDKITE_JOB_ID=1111
export BUILDKITE_PLUGIN_DOCKER_COMPOSE_PUSH=app
Expand Down
17 changes: 10 additions & 7 deletions tests/run.bats
Original file line number Diff line number Diff line change
Expand Up @@ -1505,17 +1505,20 @@ export BUILDKITE_JOB_ID=1111
}

@test "Run with Docker labels" {
export BUILDKITE_JOB_ID=1111
export BUILDKITE_PLUGIN_DOCKER_COMPOSE_RUN=myservice
export BUILDKITE_PIPELINE_SLUG=test
# Pipeline vars
export BUILDKITE_AGENT_ID="1234"
export BUILDKITE_AGENT_NAME="agent"
export BUILDKITE_BUILD_NUMBER=1
export BUILDKITE_COMMAND=pwd
export BUILDKITE_PLUGIN_DOCKER_COMPOSE_RUN_LABELS="true"
export BUILDKITE_PIPELINE_NAME="label-test"
export BUILDKITE_JOB_ID=1111
export BUILDKITE_LABEL="Testjob"
export BUILDKITE_PIPELINE_NAME="label-test"
export BUILDKITE_PIPELINE_SLUG=test
export BUILDKITE_STEP_KEY="test-job"
export BUILDKITE_AGENT_NAME="agent"
export BUILDKITE_AGENT_ID="1234"

# Plugin config
export BUILDKITE_PLUGIN_DOCKER_COMPOSE_RUN=myservice
export BUILDKITE_PLUGIN_DOCKER_COMPOSE_RUN_LABELS="true"

stub docker-compose \
"-f docker-compose.yml -p buildkite1111 -f docker-compose.buildkite-1-override.yml pull myservice : echo pulled myservice" \
Expand Down

0 comments on commit 9eac919

Please sign in to comment.