fix: finish test_isolated cleanup on Ctrl+C
uv run forwards SIGINT to the child that already got it from the process group, so the second KeyboardInterrupt aborted the cleanup and left the test container and database behind. Run the script with $(PYTHON) like the skeleton checks and ignore SIGINT during cleanup. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -166,10 +166,11 @@ student_test:
|
||||
|
||||
# образ на временной базе test_<POSTGRES_DB>: сборка, миграции, отдельный
|
||||
# контейнер api на 127.0.0.1:TEST_APP_PORT, make test и make student_test,
|
||||
# затем уборка при любом исходе. KEEP_TEST_DB=1 оставляет базу для разбора
|
||||
# затем уборка при любом исходе. KEEP_TEST_DB=1 оставляет базу для разбора.
|
||||
# $(PYTHON), а не uv run: uv повторно шлёт SIGINT, и Ctrl+C обрывал уборку
|
||||
.PHONY: test_isolated
|
||||
test_isolated: env_setup start_db
|
||||
uv run python student-tests/run_isolated.py $(if $(KEEP_TEST_DB),--keep-db,)
|
||||
$(PYTHON) student-tests/run_isolated.py $(if $(KEEP_TEST_DB),--keep-db,)
|
||||
|
||||
.PHONY: lint
|
||||
lint:
|
||||
|
||||
Reference in New Issue
Block a user