7
0
mirror of https://github.com/ChristianLight/tutor.git synced 2024-05-29 12:20:49 +00:00
tutor/tests/commands
Régis Behmo a2a3c022b8 fix: bind-mount in dev-specific services
The -m/--mount option makes it possible to bind-mount volumes at runtime. The
volumes are declared in a local/docker-compose.tmp.yml file. The problem with
this approach is when we want to bind-mount a volume to a service which is
specific to the dev context. For instance: the "learning" service when the MFE
plugin is enabled.

In such a case, starting the service triggers a call to `docker-compose stop`
in the local context. This call fails because the "learning" service does not
exist in the local context. Note that this issue only seems to occur with
docker-compose v1.

To resolve this issue, we create two additional filters for
the dev context, which emulate the behaviour of the local context. With this approach, we convert the -m/--mount arguments right after they are parsed. Because they are parsed just once, we can get rid of the de-duplication logic initially introduced with the COMPOSE_CLI_MOUNTS context.

Close #711. Close also https://github.com/overhangio/tutor-mfe/issues/57.
2022-07-29 19:53:02 +02:00
..
__init__.py refactor: add code coverage, cover CLI commands with tests 2022-01-04 13:40:33 +01:00
base.py feat: migrate to plugins.v1 with filters & actions 2022-04-15 15:30:54 +02:00
test_cli.py feat: migrate to plugins.v1 with filters & actions 2022-04-15 15:30:54 +02:00
test_compose.py fix: bind-mount in dev-specific services 2022-07-29 19:53:02 +02:00
test_config.py fix: get rid of the tutor config render command 2022-06-03 12:54:27 +02:00
test_context.py refactor: add code coverage, cover CLI commands with tests 2022-01-04 13:40:33 +01:00
test_dev.py feat: migrate to plugins.v1 with filters & actions 2022-04-15 15:30:54 +02:00
test_images.py feat: migrate to plugins.v1 with filters & actions 2022-04-15 15:30:54 +02:00
test_k8s.py feat: migrate to plugins.v1 with filters & actions 2022-04-15 15:30:54 +02:00
test_local.py fix: copyfrom unit test on python 3.7 2022-04-24 10:39:51 +02:00
test_plugins.py feat: migrate to plugins.v1 with filters & actions 2022-04-15 15:30:54 +02:00