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

feat(test): consolidate kafka mocks #1001

Merged
merged 7 commits into from
Jan 10, 2025
Merged

feat(test): consolidate kafka mocks #1001

merged 7 commits into from
Jan 10, 2025

Conversation

thetif
Copy link
Collaborator

@thetif thetif commented Jan 9, 2025

🎫 Linked Ticket

OY2-32109

💬 Description / Notes

Tried to intercept calls to Kafka, but I was having trouble catching them. Consolidated creating the mocks for Kafka and included them in the setup script.

🛠 Changes

  • created a reusable mocked Kafka in mocks
  • set up the lib tests to use that mocked Kafka
  • updated tests to remove additional mocking
  • updated submission tests to remove duplication
  • updated cognito mock to handle getting list of users as well as getting a filtered list

@thetif thetif changed the title Mock-test-kafka feat(test): consolidate kafka mocks Jan 9, 2025
Copy link
Contributor

github-actions bot commented Jan 9, 2025

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 80.48% 6961 / 8649
🔵 Statements 79.46% 7277 / 9158
🔵 Functions 72.11% 2048 / 2840
🔵 Branches 48.93% 1350 / 2759
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
lib/vitest.setup.ts 100% 100% 100% 100%
lib/lambda/checkConsumerLag.test.ts 100% 100% 100% 100%
lib/lambda/submit/index.test.ts 100% 100% 100% 100%
lib/lambda/submit/indexMissingAttachments.test.ts 100% 100% 100% 100%
lib/lambda/submit/indexUnauthorized.test.ts 100% 100% 100% 100%
lib/libs/api/kafka.test.ts 100% 100% 100% 100%
lib/libs/email/getAllStateUsers.test.ts 100% 100% 100% 100%
lib/libs/email/vitest.setup.ts 100% 100% 100% 100%
Generated in workflow #1443 for commit 7916188 by the Vitest Coverage Report Action

@thetif thetif temporarily deployed to mock-test-kafka January 9, 2025 22:59 — with GitHub Actions Inactive
@thetif thetif temporarily deployed to mock-test-kafka January 9, 2025 22:59 — with GitHub Actions Inactive
@thetif thetif temporarily deployed to mock-test-kafka-app January 9, 2025 22:59 — with GitHub Actions Inactive
@thetif thetif temporarily deployed to mock-test-kafka-kibana January 9, 2025 22:59 — with GitHub Actions Inactive
@thetif thetif temporarily deployed to mock-test-kafka January 9, 2025 22:59 — with GitHub Actions Inactive
@thetif thetif marked this pull request as ready for review January 10, 2025 14:30
@thetif thetif merged commit d2df3ee into main Jan 10, 2025
17 checks passed
@thetif thetif deleted the mock-test-kafka branch January 10, 2025 14:53
Copy link
Contributor

🎉 This PR is included in version 1.5.0-val.104 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

2 participants