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

Adds option to create large random files as test submissions #7161

Merged
merged 2 commits into from
May 24, 2024

Conversation

zenmonkeykstop
Copy link
Contributor

@zenmonkeykstop zenmonkeykstop commented May 16, 2024

Status

Ready for review

Description of Changes

Adds --random-file-size option to loaddata.py. If set to 0, default file creation behaviour is followed. If set to N > 0, files containing random data NKB will be created instead.

Adds safety ignores as per freedomofpress/fpf-misc-resources#43

Testing

  • Run make dev and confirm it completes successfully, creating the usual test journalists and sources
  • start a shell on the running dev instance with eg docker exec -it securedrop-dev-0 bash
  • Confirm that the command ./loaddata.py --random-file-size 100 completes successfully
  • Confirm that 3 new sources with 100KB file submissions have been created, checking the JI and /var/lib/securedrop/store

Deployment

N/A dev only.

@zenmonkeykstop zenmonkeykstop requested a review from a team as a code owner May 16, 2024 20:22
@zenmonkeykstop zenmonkeykstop force-pushed the add-random-test-data branch 2 times, most recently from 999631a to 9f826a4 Compare May 16, 2024 20:24
@zenmonkeykstop zenmonkeykstop force-pushed the add-random-test-data branch from ab28edd to 7a04452 Compare May 16, 2024 21:02
@eloquence eloquence self-assigned this May 23, 2024
Makefile Show resolved Hide resolved
Copy link
Member

@eloquence eloquence left a comment

Choose a reason for hiding this comment

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

LGTM & test plan checks out.

@eloquence eloquence merged commit fa5ecc7 into develop May 24, 2024
17 checks passed
@legoktm legoktm deleted the add-random-test-data branch January 9, 2025 22:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants