Test Data Generator
When creating new features, it is helpful to have sample data for the feature to interact with. The TSP Award Queue is an example of that--it matches shipments to TSPs, and it's hard to tell if it's working without some shipments and TSPs in the database!
make bin/generate-test-datawill build the fake data generator binarybin/generate-test-data --named-scenario="dev_seed"will populate the development database with a handful of users in various stages of progress along the flow. The emails are named accordingly (seedevseed.go). Alternatively, runmake db_dev_e2e_populateto reset your db and populate it.bin/generate-test-datawill run binary and create a preconfigured set of test data. To determine the data scenario you'd like to use, check out scenarios in thetestdatagenpackage. Each scenario contains a description of what data will be created when the scenario is run. Pass the scenario in as a flag to the generate-test-data function. A sample command:./bin/generate-test-data --scenario=2.
There is also a package (/pkg/testdatagen) that can be imported to create arbitrary test data. This could be used in tests, so as not to duplicate functionality.
Currently, scenarios have the following numbers:
--scenario=1for Award Queue Scenario 1--scenario=2for Award Queue Scenario 2--scenario=3for Duty Station Scenario--scenario=4for PPM or PPM SIT Estimate Scenario (can also use Rate Engine Scenarios for Estimates)--scenario=5for Rate Engine Scenario 1--scenario=6for Rate Engine Scenario 2--scenario=7for TSP test data