Skip to content

Commit 51c65e6

Browse files
committed
added documentation
1 parent 1ed7081 commit 51c65e6

File tree

1 file changed

+27
-0
lines changed
  • api/tests/integration/populate_tests

1 file changed

+27
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
## Adding Tests to populate_tests
2+
3+
To add a test in `populate_tests`, you need to work with 3 `sources_test.csv` files in sequence:
4+
5+
1. **`tests/test_data/sources_test.csv`** - The base test data file
6+
2. **`tests/integration/test_data/sources_test.csv`** - The intermediate file where data is accumulated
7+
3. **`tests/integration/populate_tests/test_data/sources_test.csv`** - The final file where your changes are visible
8+
9+
### Workflow
10+
11+
When running `populate_tests`:
12+
1. It starts from the base file (`tests/test_data/sources_test.csv`)
13+
2. Adds/merges it to the integration test data (`tests/integration/test_data/sources_test.csv`)
14+
3. You see your final changes in the populate_tests data (`tests/integration/populate_tests/test_data/sources_test.csv`)
15+
16+
### Example
17+
18+
If you want to test a new feed scenario (like the `gtfs realtime feed references` overwrite behavior in `test_populate.py`):
19+
1. Modify the entry in `tests/test_data/sources_test.csv` with your test data
20+
2. Write your test assertions in `test_populate.py` to validate the expected behavior
21+
3. Run the populate script/tests
22+
4. Verify the results appear correctly in `tests/integration/populate_tests/test_data/sources_test.csv`
23+
24+
25+
---
26+
27+
This cascading approach ensures that base test data flows through the system and allows you to verify how the populate process handles data merging and updates.

0 commit comments

Comments
 (0)