New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix test data for TSPs (GBLOCs and Duty Stations) #1105

Merged
merged 3 commits into from Oct 11, 2018

Conversation

2 participants
@chrisgilmerproj
Contributor

chrisgilmerproj commented Oct 9, 2018

Description

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:

  • Separate the Source and Destination GBLOC's (and use realistic data)
  • Make the New Duty Station a different zip code than the Service Member Duty Station

Reviewer Notes

Nope.

Setup

 make db_dev_reset && make db_dev_migrate && go run ./cmd/generate_test_data/main.go -scenario=7

Go to http://tsplocal:3000/internal/docs#/moves/showMoveDatesSummary

Enter a MoveID and a date (format like 2018-10-09) and execute. You should get a 200 response back.

Code Review Verification Steps

  • End to end tests pass (make e2e_test).
  • Request review from a member of a different team.

chrisgilmerproj added some commits Oct 9, 2018

@chrisgilmerproj chrisgilmerproj self-assigned this Oct 9, 2018

@chrisgilmerproj

This comment has been minimized.

Show comment
Hide comment
@chrisgilmerproj

chrisgilmerproj Oct 9, 2018

Contributor

I keep getting an error when running tests:

Could not determine TDL for shipment ID 00000000-0000-0000-0000-000000000000 for move ID ff3bdfd4-f83b-4595-94a9-cd8eacb323b6: Could not fetch region for zip 32102: could not find zip3 for 321: sql: no rows in result set

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.

Contributor

chrisgilmerproj commented Oct 9, 2018

I keep getting an error when running tests:

Could not determine TDL for shipment ID 00000000-0000-0000-0000-000000000000 for move ID ff3bdfd4-f83b-4595-94a9-cd8eacb323b6: Could not fetch region for zip 32102: could not find zip3 for 321: sql: no rows in result set

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.

@chrisgilmerproj

This comment has been minimized.

Show comment
Hide comment
@chrisgilmerproj

chrisgilmerproj Oct 10, 2018

Contributor

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.

Contributor

chrisgilmerproj commented Oct 10, 2018

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.

@reggieriser

LGTM. Both server tests and e2e tests passed 100%.

@chrisgilmerproj chrisgilmerproj merged commit 4037763 into master Oct 11, 2018

6 checks passed

ci/circleci: build_app Your tests passed on CircleCI!
Details
ci/circleci: build_migrations Your tests passed on CircleCI!
Details
ci/circleci: integration_tests Your tests passed on CircleCI!
Details
ci/circleci: pre_deps_golang Your tests passed on CircleCI!
Details
ci/circleci: pre_deps_yarn Your tests passed on CircleCI!
Details
ci/circleci: pre_test Your tests passed on CircleCI!
Details

@chrisgilmerproj chrisgilmerproj deleted the cg_destination_gbloc_and_diff_duty_stations branch Oct 11, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment