Repository navigation
Tests: one script for the test DB init, used by CI and TESTS.md (stacked on #2964) - #2972
Open
atalyaalon wants to merge 1 commit into
Open
atalyaalon wants to merge 1 commit into
atalyaalon wants to merge 1 commit into
Conversation
bin/init_test_db.sh CONTAINER runs the migrations and the 6 data loads. CI (Tests.yml, container anyway) and docs/TESTS.md (anyway-tests) both call it, so the two can't drift apart again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XtN7GhfRRihvBTHsWxGZoV
1 task done
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The test-DB setup (the migrations plus 6 data loads) lived in two places,
.github/workflows/Tests.ymlanddocs/TESTS.md, and they had drifted apart: the oldTESTS.mdonly loadedregistered-vehiclesandcbs. @ziv17 asked about exactly this on #2964.Change
bin/init_test_db.sh CONTAINER: the single source of the test-DB init.alembic upgrade head, thencities,streets,registered-vehicles,cbs --source local_dir_for_tests_only,road-segmentsandjunctions.set -euo pipefail, so it stops at the first error, and it prints each step.Tests.yml:bin/init_test_db.sh anyway. The steps and their order are unchanged.docs/TESTS.md:bin/init_test_db.sh anyway-tests. The clean-start note from Upgrade DB images to PostgreSQL 18 / PostGIS 3.7 + upgrade runbook #2964 (docker compose -f docker-compose-tests.yml down -v) is kept.Stacked on #2964
claude/gallant-archimedes-nwlpao(Upgrade DB images to PostgreSQL 18 / PostGIS 3.7 + upgrade runbook #2964). Merge Upgrade DB images to PostgreSQL 18 / PostGIS 3.7 + upgrade runbook #2964 first. GitHub then retargets this PR tonew-cbs-format.new-cbs-format(no DB change), so merge it when no Airflow DAG is running.Testing
master,devornew-cbs-format, and this PR's base is Upgrade DB images to PostgreSQL 18 / PostGIS 3.7 + upgrade runbook #2964's branch. They run once Upgrade DB images to PostgreSQL 18 / PostGIS 3.7 + upgrade runbook #2964 merges and GitHub retargets this PR tonew-cbs-format. Check that Tests is green before merging.48be8ba4on Upgrade DB images to PostgreSQL 18 / PostGIS 3.7 + upgrade runbook #2964's branch, before it was moved here: Tests, Pylint, Black and CodeQL were all green.https://claude.ai/code/session_01XtN7GhfRRihvBTHsWxGZoV
Generated by Claude Code