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

Fix user model tests #1296

Merged
merged 2 commits into from
Aug 30, 2024
Merged

Fix user model tests #1296

merged 2 commits into from
Aug 30, 2024

Conversation

jonathangoulding
Copy link
Collaborator

@jonathangoulding jonathangoulding commented Aug 30, 2024

DEFRA/water-abstraction-team#124

As part of ongoing work to remove database cleans from the test suit we are getting intermittent tests failing. In this case we are seeing tests interfering with each other when they use the user id's form the ref data.

As these are fixed (seeded) there maybe some cross over in tests. So we update the tests to find the individual elements it has created and asserts against that, rather than length of an array or position of the element in the array.

As part of ongoing work to remove database cleans from the test suit we are getting intermittent tests failing. In this case we are seeing tests interfering with each other when they use the user id's form the ref data.

As these are fixed (seeded) there maybe some cross over in tests. So we update the tests to find the individual elements it has created and asserts against that, rather than length of an array or position of the element in the array.
@jonathangoulding jonathangoulding added bug Something isn't working testing A change to the tests or CI labels Aug 30, 2024
@jonathangoulding jonathangoulding self-assigned this Aug 30, 2024
@jonathangoulding jonathangoulding merged commit 26be045 into main Aug 30, 2024
6 checks passed
@jonathangoulding jonathangoulding deleted the fix-user-model-tests branch August 30, 2024 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working testing A change to the tests or CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants