coner-tech / coner-core

DEPRECATED A REST API for autocross event operations
GNU Affero General Public License v3.0
7 stars 3 forks source link

Simplify setting up the prerequisite entities for integration tests #179

Closed carltonwhitehead closed 7 years ago

carltonwhitehead commented 7 years ago

Currently, integration tests that depend on many entities to already exist are quite verbose. Consider that an integration which would verify that a time can be added to a run would have to set up at least the following prerequisites:

  1. Create a handicap group
  2. Create a handicap group set with the created handicap group
  3. Create a competition group
  4. Create a competition group set with the created competition group
  5. Create an event with the handicap group set and competition group set
  6. Create a registration
  7. Create a run with the registration

All of the above steps would be good candidates for code reuse among other and existing integration tests.

carltonwhitehead commented 7 years ago

After looking through the integration test code, I've decided not to "fix" this since it would remove too much relevant context from the integration tests themselves, and create a lot of additional code to maintain. Doesn't seem worth the effort.