Skip to content

Commit

Permalink
Remove setting return cycle in ReturnLogHelper
Browse files Browse the repository at this point in the history
When attempting to run the acceptance tests we found most of them were now failing. After investigating we tracked it down to a [recent change made](#1353) to the `ReturnLogHelper`.

We started setting `returnCycleId` to a generated UUID. Normally, return logs have this set to the return cycle they fall within. However, if it is set (in the DB proper) the ID _must_ exist in `return.return_cycles`.

We've opted not to replicate foreign key constraints in our test DB legacy migrations because of the additional complexity they would add to our unit tests, for something we don't need to cover in them.

It wasn't being set before, because our premise for the helpers is they set _only_ what is required in order to insert a record. Any fields that are 'optional', are expected to be set within the test using the helper and passed in.

Fortunately, removing the call in the helper hasn't broken any existing tests, further highlighting we don't really need this defaulted for what we are testing. And removing the call gets the acceptance tests passing again!
  • Loading branch information
Cruikshanks committed Oct 10, 2024
1 parent f1828c4 commit f5f3838
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit f5f3838

Please sign in to comment.