Skip to content

Commit

Permalink
fix: use 'docker compose' for ci
Browse files Browse the repository at this point in the history
  • Loading branch information
wrn14897 committed Aug 22, 2024
1 parent ae34906 commit 47bebee
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ unsmoke: docker_compose_present
@echo ""
@echo "+++ Spinning down the smokers."
@echo ""
cd smoke-tests && docker-compose down --volumes
cd smoke-tests && docker compose down --volumes

#: use this for local smoke testing
resmoke: unsmoke smoke
Expand All @@ -65,4 +65,4 @@ resmoke: unsmoke smoke

.PHONY: docker_compose_present
docker_compose_present:
@which docker-compose || (echo "Required docker-compose command is missing"; exit 1)
@which docker compose || (echo "Required docker compose command is missing"; exit 1)
6 changes: 3 additions & 3 deletions smoke-tests/smoke-sdk-grpc-ts.bats
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ NODE_METER_NAME="node-monitor-meter"

setup_file() {
echo "# 🚧" >&3
docker-compose up --build --detach collector ${CONTAINER_NAME}
docker compose up --build --detach collector ${CONTAINER_NAME}
wait_for_ready_app ${CONTAINER_NAME}
curl --silent "http://localhost:3000"
wait_for_traces
Expand All @@ -18,8 +18,8 @@ setup_file() {

teardown_file() {
cp collector/data.json collector/data-results/data-${CONTAINER_NAME}.json
docker-compose stop ${CONTAINER_NAME}
docker-compose restart collector
docker compose stop ${CONTAINER_NAME}
docker compose restart collector
wait_for_flush
}

Expand Down
6 changes: 3 additions & 3 deletions smoke-tests/smoke-sdk-grpc.bats
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ METER_NAME="hello-world-meter"

setup_file() {
echo "# 🚧" >&3
docker-compose up --build --detach collector ${CONTAINER_NAME}
docker compose up --build --detach collector ${CONTAINER_NAME}
wait_for_ready_app ${CONTAINER_NAME}
curl --silent "http://localhost:3000"
wait_for_traces
Expand All @@ -17,8 +17,8 @@ setup_file() {

teardown_file() {
cp collector/data.json collector/data-results/data-${CONTAINER_NAME}.json
docker-compose stop ${CONTAINER_NAME}
docker-compose restart collector
docker compose stop ${CONTAINER_NAME}
docker compose restart collector
wait_for_flush
}

Expand Down
6 changes: 3 additions & 3 deletions smoke-tests/smoke-sdk-http-ts.bats
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ NODE_METER_NAME="node-monitor-meter"

setup_file() {
echo "# 🚧" >&3
docker-compose up --build --detach collector ${CONTAINER_NAME}
docker compose up --build --detach collector ${CONTAINER_NAME}
wait_for_ready_app ${CONTAINER_NAME}
curl --silent "http://localhost:3000"
wait_for_traces
Expand All @@ -18,8 +18,8 @@ setup_file() {

teardown_file() {
cp collector/data.json collector/data-results/data-${CONTAINER_NAME}.json
docker-compose stop ${CONTAINER_NAME}
docker-compose restart collector
docker compose stop ${CONTAINER_NAME}
docker compose restart collector
wait_for_flush
}

Expand Down
6 changes: 3 additions & 3 deletions smoke-tests/smoke-sdk-http.bats
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ METER_NAME="hello-world-meter"

setup_file() {
echo "# 🚧" >&3
docker-compose up --build --detach collector ${CONTAINER_NAME}
docker compose up --build --detach collector ${CONTAINER_NAME}
wait_for_ready_app ${CONTAINER_NAME}
curl --silent "http://localhost:3000"
wait_for_traces
Expand All @@ -17,8 +17,8 @@ setup_file() {

teardown_file() {
cp collector/data.json collector/data-results/data-${CONTAINER_NAME}.json
docker-compose stop ${CONTAINER_NAME}
docker-compose restart collector
docker compose stop ${CONTAINER_NAME}
docker compose restart collector
wait_for_flush
}

Expand Down
2 changes: 1 addition & 1 deletion smoke-tests/test_helpers/utilities.bash
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ wait_for_ready_app() {
MAX_RETRIES=10
echo -n "# 🍿 Setting up ${CONTAINER}" >&3
NEXT_WAIT_TIME=0
until [ $NEXT_WAIT_TIME -eq $MAX_RETRIES ] || [[ $(docker-compose logs ${CONTAINER} | grep "Now listening on:") ]]
until [ $NEXT_WAIT_TIME -eq $MAX_RETRIES ] || [[ $(docker compose logs ${CONTAINER} | grep "Now listening on:") ]]
do
echo -n " ... $(( NEXT_WAIT_TIME++ ))s" >&3
sleep $NEXT_WAIT_TIME
Expand Down

0 comments on commit 47bebee

Please sign in to comment.