Skip to content

FECFILE-2421: delete load test mirror data - #2292

Merged
toddlees merged 4 commits into
developfrom
feature/2421-delete_load_test_data
Sep 16, 2026
Merged

toddlees merged 4 commits into
developfrom
feature/2421-delete_load_test_data

Conversation

@danguyf

@danguyf danguyf commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Ticket link:
https://fecgov.atlassian.net/browse/FECFILE-2421

Related PRs:
N/A

  • unit tests pass
  • successfully tested in load mirror by running gen_locust_load_test_data, get_overview to get the counts, then delete_locust_load_test_data, then get_overview again

Comment thread django-backend/manage.py
Comment thread django-backend/fecfiler/devops/tests/test_load_test_utils.py
except ValueError as error:
raise CommandError(str(error)) from error

load_test_utils.delete_load_test_committees_and_data()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any reason not to put this inside the try?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

validate_load_mirror_runtime() is in the try because I want to test that we're in the load mirror and capture/raise it as a sort of pre-flight error if we aren't, whereas if the actual delete fails I'm fine with it stacktracing all over the terminal.

Including it in the try maybe makes a lot of sense, though...

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a second try because I want to differentiate between the two sources of exceptions and handle them differently. Thoughts?

Comment thread django-backend/fecfiler/devops/utils/load_test.py
Comment thread django-backend/fecfiler/devops/utils/load_test.py
Comment thread django-backend/fecfiler/devops/utils/load_test.py

@dheitzer dheitzer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just some thoughts

Comment thread django-backend/fecfiler/devops/utils/load_test.py

@lbeaufort lbeaufort left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks for including tests!

@sonarqubecloud

Copy link
Copy Markdown

@danguyf
danguyf requested a review from dheitzer September 16, 2026 18:02
@toddlees
toddlees merged commit 6f3d4b1 into develop Sep 16, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants