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

qa_loader.py creates records referencing pre-existing sources and journalists #3739

Closed
zenmonkeykstop opened this issue Aug 25, 2018 · 2 comments
Assignees
Labels

Comments

@zenmonkeykstop
Copy link
Contributor

zenmonkeykstop commented Aug 25, 2018

Description

/var/www/securedrop/qa_loader.py is used during testing to create large amounts of random test data. If there are pre-existing journalists and sources in the database it may create random replies and submissions for them, confusing testing.

Steps to Reproduce

  • Install 0.8.0
  • Create admin account via CLI on app server
  • As source, submit message and record source codephrase
  • As admin, reply to message
  • Log in to app server and run
sudo su 
cd /var/www/securedrop
./qa_loader.py --multiplier=1
  • Upgrade to 0.9.0~rc1
  • As previous source, check for replies

Expected Behavior

Source sees original reply from journalist

Actual Behavior

Source sees reply from journalist preceded by blank replies

Comments

Screenshot attached. This is probably a low-priority bug, but it would make testing easier if it were fixed.

screenshot from 2018-08-24 23-40-36

@redshiftzero redshiftzero added this to the 0.9 milestone Aug 27, 2018
@eloquence eloquence removed this from the 0.9 milestone Aug 30, 2018
@redshiftzero
Copy link
Contributor

The simple fix here is in QA to:

  1. Create admin users
  2. Run the qa loader
  3. Submit document as source

Submitting the document as a source after running the QA loader sidesteps this issue - let's do that from now on.

@heartsucker
Copy link
Contributor

I can fix this. We just need to keep track of the sources/docs/etc that we create in lists and then use those in the following steps.

Also, it hasn't happened yet, but there's another bug where if you create a source then delete one the loader will crap out because it uses ranges to iterate over ids.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants