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 secrets fetcher tests where none existed before #1019

Merged
merged 9 commits into from
Nov 7, 2024

Conversation

RyanBalfanz
Copy link
Member

@RyanBalfanz RyanBalfanz commented Nov 4, 2024

Closes #

💸 TL;DR

Add tests to secrets fetcher sidecar, none existed before. These tests help to capture existing behavior so that changes can be made to secrets fetching with confidence.

I started looking at the atomicity of secrets fetching (i.e. the temporary file), in particular a common failure mode using json.dump causing partial writes and malformed JSON files, but want to add some tests before making any changes to the implementation.

📜 Details

Design Doc

Jira

🧪 Testing Steps / Validation

✅ Checks

  • CI tests (if present) are passing
  • Adheres to code style for repo
  • Contributor License Agreement (CLA) completed if not a Reddit employee

@RyanBalfanz RyanBalfanz marked this pull request as ready for review November 4, 2024 18:21
@RyanBalfanz RyanBalfanz requested a review from a team as a code owner November 4, 2024 18:21
@RyanBalfanz RyanBalfanz changed the title Secrets fetcher tests Add secrets fetcher tests where none existed before Nov 4, 2024
tests/unit/sidecars/secrets_fetcher_tests.py Outdated Show resolved Hide resolved
tests/unit/sidecars/secrets_fetcher_tests.py Show resolved Hide resolved
pyproject.toml Show resolved Hide resolved
Copy link

@mathyourlife-reddit mathyourlife-reddit left a comment

Choose a reason for hiding this comment

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

Thanks for adding tests!!!

tests/unit/sidecars/secrets_fetcher_tests.py Outdated Show resolved Hide resolved
tests/unit/sidecars/secrets_fetcher_tests.py Outdated Show resolved Hide resolved
tests/unit/sidecars/secrets_fetcher_tests.py Outdated Show resolved Hide resolved
tests/unit/sidecars/secrets_fetcher_tests.py Show resolved Hide resolved
Copy link
Member

@chriskuehl chriskuehl left a comment

Choose a reason for hiding this comment

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

Thanks for adding this!

@chriskuehl chriskuehl merged commit 69e7d4f into reddit:develop Nov 7, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants