Skip to content
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

Add Charge version change reasons to seeder #1274

Merged
merged 8 commits into from
Aug 20, 2024

Conversation

Cruikshanks
Copy link
Member

https://eaflood.atlassian.net/browse/WATER-4579

We recently started seeding the test DB with reference data. We then Restructured that seeding to be Knex based.

We thought we'd covered all reference data with the seeding. But we've just spotted that we missed charge version change reasons (ChangeReasonModel).

We're about to add some new unit tests in Add history attributes to ChargeVersionModel that depend on them. So, rather than inserting more into the DB, this change switches change reasons to be 'reference' based, i.e., tests should select from pre-seeded reasons rather than adding generated ones.

https://eaflood.atlassian.net/browse/WATER-4579

We recently started [seeding the test DB with reference data](#1206). We then [Restructured that seeding to be Knex based](#1230).

We thought we'd covered all reference data with the seeding. But we've just spotted that we missed charge version change reasons (`ChangeReasonModel`).

We're about to add some new unit tests in [Add history attributes to ChargeVersionModel](#1272) that depend on them. So, rather than insert yet more into the DB, this change switches change reasons to be 'reference' based, i.e. tests should select from pre-seeded reasons rather than adding generated ones.
@Cruikshanks Cruikshanks added the housekeeping Refactoring, tidying up or other work which supports the project label Aug 20, 2024
@Cruikshanks Cruikshanks self-assigned this Aug 20, 2024
@Cruikshanks Cruikshanks marked this pull request as ready for review August 20, 2024 20:59
@Cruikshanks Cruikshanks merged commit 9dcdc6d into main Aug 20, 2024
6 checks passed
@Cruikshanks Cruikshanks deleted the add-change-reasons-to-seeder branch August 20, 2024 20:59
Cruikshanks added a commit that referenced this pull request Aug 20, 2024
https://eaflood.atlassian.net/browse/WATER-4579

We recently started [seeding the test DB with reference data](#1206). We then [Restructured that seeding to be Knex based](#1230).

We thought we'd covered all reference data with the seeding. But we've just spotted that we missed charge version change reasons (`ChangeReasonModel`).

We're about to add some new unit tests in [Add history attributes to ChargeVersionModel](#1272) that depend on them. So, rather than inserting more into the DB, this change switches change reasons to be 'reference' based, i.e., tests should select from pre-seeded reasons rather than adding generated ones.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
housekeeping Refactoring, tidying up or other work which supports the project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant