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 staging-specific creation of test data #4298

Merged
merged 4 commits into from
Mar 26, 2019

Conversation

rmol
Copy link
Contributor

@rmol rmol commented Mar 25, 2019

Status

Ready for review

Description of Changes

This PR cherry-picks a few commits from tbb-0.12.0 to add a --staging argument to the create-dev-data.py script, which skips creation of the second journalist and all source accounts.

Fixes #4286.

Testing

As in securedrop/tests/functional/README.md:

  • sudo -u www-data bash
  • cd /var/www/securedrop/
  • ./manage.py reset # This will clean the DB for testing
  • ./create-dev-data.py --staging

Verify that only the first journalist account was added to the database:

  • cd /var/lib/securedrop
  • sqlite3 db.sqlite
  • select * from journalists;

Checklist

If you made changes to the server application code:

  • Linting (make ci-lint) and tests (make -C securedrop test) pass in the development container

If you made non-trivial code changes:

  • I have written a test plan and validated it for this PR

kushaldas and others added 4 commits March 22, 2019 17:21
We now have --staging flag to the create-dev-data.py script so
that we can easily create an user in the staging or prodcution test
and then use the functional tests to test the instance.

(cherry picked from commit b08a0d7)
Typically these actions were done manually but lets get our good old
friend ansible to run them for us (at least under the upgrade env).
Copy link
Contributor

@kushaldas kushaldas left a comment

Choose a reason for hiding this comment

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

Looks good to me. Approved.

@kushaldas kushaldas merged commit 455e69a into freedomofpress:develop Mar 26, 2019
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