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 tests for empty or malformed recipient gpg key #6912

Merged
merged 1 commit into from Aug 9, 2023

Conversation

rocodes
Copy link
Contributor

@rocodes rocodes commented Aug 3, 2023

Status

Ready for review

Description of Changes

Fixes #6889.

Changes proposed in this pull request:

Add tests for cases of missing or malformed journalist key

Visual review/CI passes

Deployment

n/a

Checklist

If you made changes to the server application code:

  • Linting (make lint) and tests (make test) pass in the development container (make rust-lint, make rust-test)

If you made non-trivial code changes:

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

Choose one of the following:

  • I have opened a PR in the docs repo for these changes, or will do so later
  • I would appreciate help with the documentation
  • These changes do not require documentation

@rocodes rocodes requested a review from a team as a code owner August 3, 2023 17:12
@rocodes rocodes requested a review from legoktm August 3, 2023 17:12
@legoktm legoktm self-assigned this Aug 3, 2023
Copy link
Member

@legoktm legoktm left a comment

Choose a reason for hiding this comment

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

Awesome! Tests and errors look good. Since most of the code is identical across the tree tests, do you want to consolidate it into one test function that iterates over the 3 cases? There's no fancy parameterization in Rust like pytest has so it'd just be iterating over a vec.

@rocodes rocodes force-pushed the 6889-add-redwood-test branch 2 times, most recently from a940926 to 6417c18 Compare August 8, 2023 17:02
redwood/src/lib.rs Outdated Show resolved Hide resolved
legoktm
legoktm previously approved these changes Aug 8, 2023
Copy link
Member

@legoktm legoktm left a comment

Choose a reason for hiding this comment

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

One tiny note if you want to change it, otherwise LGTM!

redwood/src/lib.rs Outdated Show resolved Hide resolved
@legoktm legoktm added the Rust Issues that touch Rust code label Aug 8, 2023
Copy link
Member

@legoktm legoktm left a comment

Choose a reason for hiding this comment

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

Awesome 🚀

@legoktm legoktm merged commit f051a65 into freedomofpress:develop Aug 9, 2023
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Rust Issues that touch Rust code
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Need Sequoia/redwood test for PGP encryption if no recipients are specified
2 participants