diff --git a/TESTING.md b/TESTING.md index 81343d6cc1..1ddd667904 100644 --- a/TESTING.md +++ b/TESTING.md @@ -28,7 +28,7 @@ npm run lint # or 'make check' if you are a Makefile kind of pe npm test # run test services and tests in Docker -docker-compose -f test/docker-compose.yml config --services # list test services +docker compose -f test/docker-compose.yml config --services # list test services npm run docker:start # start all test services npm run docker:start redis # start one or more test services npm run docker:stop # stop all test services diff --git a/test/docker-compose.yml b/test/docker-compose.yml index 23ccba1ae4..1fb739bb9c 100644 --- a/test/docker-compose.yml +++ b/test/docker-compose.yml @@ -1,5 +1,3 @@ -version: '2.1' - services: postgres: user: postgres @@ -51,6 +49,8 @@ services: mysql: image: mysql:5.7 + # No ARM64 image layer. See https://stackoverflow.com/a/65592942 + platform: linux/x86_64 environment: MYSQL_ALLOW_EMPTY_PASSWORD: 1 ports: diff --git a/test/script/docker/run_tests.sh b/test/script/docker/run_tests.sh index 059aad8069..754fdd8576 100755 --- a/test/script/docker/run_tests.sh +++ b/test/script/docker/run_tests.sh @@ -18,7 +18,7 @@ else CMD='npm test' fi -NODE_VERSION=${1} docker-compose --no-ansi --log-level ERROR -f ./test/docker-compose.yml -f ./test/docker-compose.ci.yml run \ +NODE_VERSION=${1} docker compose --no-ansi --log-level ERROR -f ./test/docker-compose.yml -f ./test/docker-compose.ci.yml run \ -e NODE_VERSION=${NODE_VERSION} \ -e TAV=${TAV_MODULES} \ -e CI=true \ @@ -33,4 +33,4 @@ NODE_VERSION=${1} docker-compose --no-ansi --log-level ERROR -f ./test/docker-co npm --version ${CMD}" -NODE_VERSION=${1} docker-compose --no-ansi --log-level ERROR -f ./test/docker-compose.yml -f ./test/docker-compose.ci.yml down -v +NODE_VERSION=${1} docker compose --no-ansi --log-level ERROR -f ./test/docker-compose.yml -f ./test/docker-compose.ci.yml down -v diff --git a/test/script/run_tests.sh b/test/script/run_tests.sh index 42fa516f26..494e248ee4 100755 --- a/test/script/run_tests.sh +++ b/test/script/run_tests.sh @@ -90,7 +90,7 @@ then else # No arguments was given. Let's just assume that the user wants to # spin up all dependencies inside Docker and run the tests locally - services=$(docker-compose -f ./test/docker-compose.yml config --services) + services=$(docker compose -f ./test/docker-compose.yml config --services) fi service_arr=( $services ) @@ -106,11 +106,11 @@ then elif [[ $healthy -lt $expected_healthy || $containers -lt $expected_containers ]] then finish () { - docker-compose -f ./test/docker-compose.yml down + docker compose -f ./test/docker-compose.yml down } trap finish EXIT - docker-compose -f ./test/docker-compose.yml up -d $services + docker compose -f ./test/docker-compose.yml up -d $services wait_for_healthy fi