6
0
mirror of https://github.com/ChristianLight/tutor.git synced 2024-11-14 17:24:08 +00:00
tutor/tests/commands
Kyle McCormick 0ae59a82a6
fix: avoid double-rendering mounts to docker-compose.tmp.yml (#669)
In certain code paths, such as in `tutor local quickstart`,
`process_mount_points` is called more than once in the same process,
causing mounts to be added to `COMPOSE_LOCAL[_JOBS]_TMP` redundantly.
As a result, docker-compose[.jobs].tmp.yml was occasionally being
rendered with duplicate volume specifiers. Some versions of Docker
Compose ignored this; other versions warned or threw an error.

In order to make `process_mount_points` tolerant to being called
multiple times, we wrap its volume-adding callbacks within a new
hooks context. This allows us to clear said hooks context every
time `process_mount_points` is called, essentially making the
function idempotent.

Co-authored-by: Régis Behmo <regis@behmo.com>
2022-07-25 15:58:49 +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: avoid double-rendering mounts to docker-compose.tmp.yml (#669) 2022-07-25 15:58:49 +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