-
Notifications
You must be signed in to change notification settings - Fork 687
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
Use definite article for single file error case; improve functional test output #5905
Conversation
(CI's probably going to fail, will let it do its thing and then update affected tests) |
fef599c
to
e8e1df8
Compare
Codecov Report
@@ Coverage Diff @@
## develop #5905 +/- ##
========================================
Coverage 85.49% 85.49%
========================================
Files 53 53
Lines 3902 3902
Branches 484 484
========================================
Hits 3336 3336
Misses 455 455
Partials 111 111
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we wanted to show the single file error message in the case where one file is selected and "Download Selected" is clicked, we could check the length of the list of things to delete here.
I'm approving as is, and will merge unless you want to try that. The test plan went fine:
- Spin up Docker env
- Remove all files from disk in the container's
/var/lib/securedrop/store
directory - Attempt to download single file
-
- Observe that single file error message is displayed
- Attempt to download multiple files
-
- Observe that multiple file error message is displayed
That would be nicer, I'll take another look, thanks @rmol |
Wow. It is super interesting how little one realizes as a translator the engineering effort & implications of what looked like a simple thing. Thank you for addressing this so quickly and keep up the good work!! |
e8e1df8
to
0d47f55
Compare
0d47f55
to
7796a8e
Compare
Thanks for the suggestion @rmol. This is now done and the correct message should be shown regardless of download method. As part of looking at functional test output, I got frustrated that the
|
Looks like it was just flaky tests, as usual :/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Tested single/multiple downloads, and verified the pytest assert rewriting in support functions, which is a nice enhancement.
Status
Ready for review
Description of Changes
pytest
assertion rewriting for our helper functions so test failures show helpful string comparison when an assertion fails.Testing
Error message behavior
On this PR's branch:
/var/lib/securedrop/store
directoryImproved assertion output
securedrop/bin/dev-shell bin/run-test -s -v tests/functional/test_journalist.py -k test_download_source_unread^