diff --git a/site/content/en/docs/contributing/running-tests.md b/site/content/en/docs/contributing/running-tests.md index a6ccf1b1..8ce6d039 100644 --- a/site/content/en/docs/contributing/running-tests.md +++ b/site/content/en/docs/contributing/running-tests.md @@ -42,7 +42,11 @@ yarn run cypress:run:chrome:canvas3d 1. Install all necessary requirements before running REST API tests: ``` pip install -r ./tests/python/requirements.txt + pip install -e ./cvat-sdk + pip install -e ./cvat-cli ``` +1. Stop any other CVAT containers which you run previously. They keep ports +which are used by containers for the testing system. **Running tests** diff --git a/tests/python/rest_api/__init__.py b/tests/python/rest_api/__init__.py index e69de29b..6370694b 100644 --- a/tests/python/rest_api/__init__.py +++ b/tests/python/rest_api/__init__.py @@ -0,0 +1,3 @@ +# Copyright (C) 2022 Intel Corporation +# +# SPDX-License-Identifier: MIT diff --git a/tests/python/shared/fixtures/init.py b/tests/python/shared/fixtures/init.py index a9adc5f5..151dd936 100644 --- a/tests/python/shared/fixtures/init.py +++ b/tests/python/shared/fixtures/init.py @@ -218,7 +218,9 @@ def start_services(rebuild=False): ) _run( - f"docker-compose -p {PREFIX} " + # use compatibility mode to have fixed names for containers (with underscores) + # https://github.com/docker/compose#about-update-and-backward-compatibility + f"docker-compose -p {PREFIX} --compatibility " + "--env-file " + osp.join(CVAT_ROOT_DIR, "tests", "python", "webhook_receiver", ".env") + f" -f {' -f '.join(DC_FILES)} up -d " @@ -264,7 +266,9 @@ def services(request): if stop: _run( - f"docker-compose -p {PREFIX} " + # use compatibility mode to have fixed names for containers (with underscores) + # https://github.com/docker/compose#about-update-and-backward-compatibility + f"docker-compose -p {PREFIX} --compatibility " + "--env-file " + osp.join(CVAT_ROOT_DIR, "tests", "python", "webhook_receiver", ".env") + f" -f {' -f '.join(DC_FILES)} down -v",