Join GitHub today
Fix test data for TSPs (GBLOCs and Duty Stations) #1105
Ran into an issue while trying to get the moves dates summary where the move had 0 miles. That's because the data was incorrect and I try to address it in this PR.
Two things here to make test data better:
make db_dev_reset && make db_dev_migrate && go run ./cmd/generate_test_data/main.go -scenario=7
Enter a MoveID and a date (format like
Code Review Verification Steps
I keep getting an error when running tests:
Seems that the zip3 and zip5 tables are empty when I run the tests. Not sure why this didn't happen in the past because it seems independent of the zip code I use.
The issue turned out to be that the zip3 table wasn't being filled in. Apparently our migrations fill that table with real data and then the tests drop all that data and you've got to fill it in again.
We can probably use this same setup for other testdata scenarios but I didn't take the time to modify those.