Repository navigation
test(braze_audience): standard live cleanup via /users/track; real oversized id in fixture - #5803
Conversation
…ersized id in fixture Follow-up to review comments on the v1.170.0 release PR (#5802): - Live cleanup (and setMembership) now posts to the endpoint the scenario syncs with. The standard scenarios cleaned up through /users/track/bulk, which fails on a key that only holds users.track. - The standard dataDelivery case now sends an external_id over Braze's 988-byte cap, so the mocked EXTERNAL_USER_ID_TOO_LARGE matches an input Braze rejects, and drops the invented transient error (the bulk cases already cover retryable indexed errors through the same handler). Co-Authored-By: Claude Opus 5.5 <[email protected]> Scanned-by: gitleaks 8.30.1
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified for the test-only updates to Braze Audience’s endpoint-aware cleanup and partial-failure fixtures.
No open issues 🎉
What changed in this PR
This test-only follow-up makes Braze Audience’s standard-endpoint tests more realistic and ensures cleanup uses the same endpoint permissions as the scenario. Production behavior is unchanged.
Changes:
- Route standard live-scenario cleanup through
/users/track, including its partner field. - Replace the mocked oversized identity with an
external_idexceeding Braze’s 988-byte limit. - Remove the synthetic transient-error case and align expected delivery results with the two-record fixture.
| File | Description |
|---|---|
test/integrations/destinations/braze_audience/live/spec.ts |
Selects standard-endpoint cleanup for both standard scenarios. |
test/integrations/destinations/braze_audience/live/api.ts |
Adds endpoint-aware membership updates and cleanup helpers. |
test/integrations/destinations/braze_audience/dataDelivery/network.ts |
Uses a genuinely oversized ID and removes the synthetic transient error. |
test/integrations/destinations/braze_audience/dataDelivery/data.ts |
Updates metadata and expected results for the revised partial-failure fixture. |
Review effort: Balanced
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #5803 +/- ##
========================================
Coverage 92.49% 92.49%
========================================
Files 742 742
Lines 41358 41358
Branches 9654 9742 +88
========================================
Hits 38254 38254
+ Misses 2921 2843 -78
- Partials 183 261 +78 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|



What are the changes introduced in this PR?
Test-only follow-up to the two Braze Audience review comments on the v1.170.0 release PR (#5802, comments r4611958140 and r4611958222). No production code changes.
live/api.ts,live/spec.ts).setMembershiptakes the endpoint (standard/bulk, fromTRACK_ENDPOINT_SPECS, withpartneron standard), and the two standard scenarios clean up withclearMembershipVia('standard'). Before, they cleaned up through/users/track/bulk, which fails on a key that only holdsusers.track, and the best-effort cleanup then left the test attribute set.external_id(dataDelivery/network.ts,data.ts). The mockedEXTERNAL_USER_ID_TOO_LARGEnow matches an id over Braze's 988-byte cap, and the invented transient error is dropped; the bulk cases already cover retryable indexed errors through the same delivery handler. The real Braze behaviour stays covered by the livebraze-audience-standard-partial-failurescenario.What is the related Linear task?
ACT2-1540
Please explain the objectives of your changes below
Keep the standard-endpoint tests honest: cleanup must work with the permission a Standard account actually has, and the component fixture should model an input Braze would really reject.
Any changes to existing capabilities/behaviour, mention the reason & what are the changes ?
None. Test code only.
Any new dependencies introduced with this change?
N/A
Any new generic utility introduced or modified. Please explain the changes.
N/A
Any technical or performance related pointers to consider with the change?
N/A
Testing
The live job (
live (braze_audience)) runs on this PR with the CI Braze key.Developer checklist
My code follows the style guidelines of this project
No breaking changes are being introduced.
All related docs linked with the PR?
All changes manually tested?
Any documentation changes needed with this change?
Is the PR limited to 10 file changes?
Is the PR limited to one linear task?
Are relevant unit and component test-cases added in new readability format?
Reviewer checklist
Is the type of change in the PR title appropriate as per the changes?
Verified that there are no credentials or confidential data exposed with the changes.
🤖 Generated with Claude Code