CCM-12950: Add Functional Tests for Events #449
Open
Namitha-Prabhu wants to merge 11 commits intomainfrom
Open
CCM-12950: Add Functional Tests for Events #449Namitha-Prabhu wants to merge 11 commits intomainfrom
Namitha-Prabhu wants to merge 11 commits intomainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Adds new functional/component test coverage around the Event Subscription (SNS) flow, alongside a few sandbox test expectation fixes and supporting test infrastructure updates.
Changes:
- Introduces component tests that publish prepared-letter CloudEvents to SNS and validate downstream allocation/upsert behavior via API + CloudWatch Logs polling.
- Updates sandbox test cases to align expected HTTP statuses (e.g., 202 on update, 404 for missing letter).
- Adds supporting helpers/deps (SNS publish helper, CloudWatch polling helper, fixtures) and wires in a sandbox test target/test type.
Reviewed changes
Copilot reviewed 13 out of 15 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/component-tests/events-tests/event-subscription.spec.ts | New SNS event subscription component tests covering success, invalid status, and duplicate events. |
| tests/helpers/send-sns-event.ts | Helper to publish events to SNS topic for tests. |
| tests/helpers/aws-cloudwatch-helper.ts | Helper to poll CloudWatch Logs for allocator/upsert processing evidence. |
| tests/helpers/event-fixtures.ts | Event payload fixture builder for prepared v1 CloudEvents. |
| tests/constants/api-constants.ts | Adds SNS topic name constant used by event tests/helpers. |
| tests/constants/request-headers.ts | Allows overriding supplier id when creating request headers (needed for allocator-derived supplier). |
| tests/sandbox/update-letter-status.spec.ts | Adjusts sandbox update-letter-status spec assertions. |
| tests/sandbox/testCases/update-multiple-status-test-cases.ts | Updates expected status from 200 to 202 for multi-status update. |
| tests/sandbox/testCases/get-letter-status-test-cases.ts | Fixes missing-letter expected status to 404. |
| tests/package.json | Adds CloudWatch Logs SDK dependency for new helper. |
| tests/e2e-tests/poetry.lock | Dependency bump for authlib. |
| .github/actions/test-types.json | Adds sandbox as a recognized test type. |
| Makefile | Adds test-sandbox target and modifies e2e proxy-name used by test command. |
| package.json | Adds an override for transitive dependency resolution. |
| package-lock.json | Lockfile updates for AWS SDK / related dependencies and new CloudWatch Logs client. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Context
Type of changes
Checklist
Sensitive Information Declaration
To ensure the utmost confidentiality and protect your and others privacy, we kindly ask you to NOT including PII (Personal Identifiable Information) / PID (Personal Identifiable Data) or any other sensitive data in this PR (Pull Request) and the codebase changes. We will remove any PR that do contain any sensitive information. We really appreciate your cooperation in this matter.