Fix several issues with testing system (#5394)

Fix https://github.com/opencv/cvat/issues/5214

1. Stable names for containers (_ vs -)
2. Improve documentation
main
Nikita Manovich 3 years ago committed by GitHub
parent 19b2643e69
commit 00228ab7bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -42,7 +42,11 @@ yarn run cypress:run:chrome:canvas3d
1. Install all necessary requirements before running REST API tests: 1. Install all necessary requirements before running REST API tests:
``` ```
pip install -r ./tests/python/requirements.txt 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** **Running tests**

@ -0,0 +1,3 @@
# Copyright (C) 2022 Intel Corporation
#
# SPDX-License-Identifier: MIT

@ -218,7 +218,9 @@ def start_services(rebuild=False):
) )
_run( _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 " + "--env-file "
+ osp.join(CVAT_ROOT_DIR, "tests", "python", "webhook_receiver", ".env") + osp.join(CVAT_ROOT_DIR, "tests", "python", "webhook_receiver", ".env")
+ f" -f {' -f '.join(DC_FILES)} up -d " + f" -f {' -f '.join(DC_FILES)} up -d "
@ -264,7 +266,9 @@ def services(request):
if stop: if stop:
_run( _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 " + "--env-file "
+ osp.join(CVAT_ROOT_DIR, "tests", "python", "webhook_receiver", ".env") + osp.join(CVAT_ROOT_DIR, "tests", "python", "webhook_receiver", ".env")
+ f" -f {' -f '.join(DC_FILES)} down -v", + f" -f {' -f '.join(DC_FILES)} down -v",

Loading…
Cancel
Save