Skip to content

Commit

Permalink
Use docker compose subcommand instead of docker-compose (#2022)
Browse files Browse the repository at this point in the history
  • Loading branch information
xrmx committed Apr 3, 2024
1 parent 3093376 commit a79d8b2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ that is a fixture which is defined
#### Adding new instrumentations to the matrix build

For tests that require external dependencies like databases, or for testing different versions of the same library,
we use a matrix build that leverages Docker and docker-compose.
we use a matrix build that leverages Docker.

The setup requires a little bit of boilerplate to get started.
In this example, we will create an instrumentation for the "foo" database, by instrumenting its Python driver, `foodriver`.
Expand Down Expand Up @@ -153,7 +153,7 @@ In this example, we will create an instrumentation for the "foo" database, by in
image: foobase:latest

You'll also have to add a `DOCKER_DEPS` environment variable to `tests/scripts/envs/foo.sh` which tells the matrix
to spin up the given docker-compose service before running your tests.
to spin up the given Docker compose service before running your tests.
You may also need to add things like hostname configuration here.

DOCKER_DEPS="foo"
Expand Down
6 changes: 3 additions & 3 deletions tests/scripts/docker/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set -ex

function cleanup {
PYTHON_VERSION=${1} docker-compose down -v
PYTHON_VERSION=${1} docker compose down -v

if [[ $CODECOV_TOKEN ]]; then
cd ..
Expand Down Expand Up @@ -42,7 +42,7 @@ echo "Running tests for ${1}/${2}"

if [[ -n $DOCKER_DEPS ]]
then
PYTHON_VERSION=${1} docker-compose up -d ${DOCKER_DEPS}
PYTHON_VERSION=${1} docker compose up -d ${DOCKER_DEPS}
fi

# CASS_DRIVER_NO_EXTENSIONS is set so we don't build the Cassandra C-extensions,
Expand All @@ -57,7 +57,7 @@ if ! ${CI}; then
.
fi

PYTHON_VERSION=${1} docker-compose run \
PYTHON_VERSION=${1} docker compose run \
-e PYTHON_FULL_VERSION=${1} \
-e LOCAL_USER_ID=$LOCAL_USER_ID \
-e LOCAL_GROUP_ID=$LOCAL_GROUP_ID \
Expand Down

0 comments on commit a79d8b2

Please sign in to comment.