Skip to content

Commit c80bc3e

Browse files
committed
Add test for the new functionality
1 parent 0fa1efa commit c80bc3e

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

tests/run.bats

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -900,6 +900,29 @@ cmd3"
900900
unstub buildkite-agent
901901
}
902902

903+
@test "Run with empty entrypoint" {
904+
export BUILDKITE_PLUGIN_DOCKER_COMPOSE_RUN=myservice
905+
export BUILDKITE_COMMAND=""
906+
export BUILDKITE_PLUGIN_DOCKER_COMPOSE_CHECK_LINKED_CONTAINERS=false
907+
export BUILDKITE_PLUGIN_DOCKER_COMPOSE_CLEANUP=false
908+
export BUILDKITE_PLUGIN_DOCKER_COMPOSE_ENTRYPOINT=""
909+
910+
stub docker \
911+
"compose -f docker-compose.yml -p buildkite1111 up -d --scale myservice=0 myservice : echo ran myservice dependencies" \
912+
"compose -f docker-compose.yml -p buildkite1111 run --name buildkite1111_myservice_build_1 -T --rm --entrypoint '' myservice : echo ran myservice"
913+
914+
stub buildkite-agent \
915+
"meta-data exists docker-compose-plugin-built-image-tag-myservice : exit 1"
916+
917+
run "$PWD"/hooks/command
918+
919+
assert_success
920+
assert_output --partial "ran myservice"
921+
922+
unstub docker
923+
unstub buildkite-agent
924+
}
925+
903926
@test "Run with mount-buildkite-agent enabled" {
904927
export BUILDKITE_PLUGIN_DOCKER_COMPOSE_RUN=myservice
905928
export BUILDKITE_COMMAND=""

0 commit comments

Comments
 (0)