Skip to content

fix: use EachLike for eventTypes array in notification pact test#711

Merged
alicenstar merged 3 commits intomainfrom
fix/pact-notification-event-types-matcher
May 1, 2026
Merged

fix: use EachLike for eventTypes array in notification pact test#711
alicenstar merged 3 commits intomainfrom
fix/pact-notification-event-types-matcher

Conversation

@alicenstar
Copy link
Copy Markdown
Member

Summary

  • Fix pact test for GET /v3/notification_event_types to use dsl.EachLike instead of a fixed-length slice
  • The previous matcher required exactly 1 item in the response array, but q=release returns all 5 release event types — any of which is a valid match
  • Also drops filters from the contract since filter structure varies per event type and isn't part of the CLI's contract concern

Shortcut story: https://app.shortcut.com/replicated/story/135446/cli-support-for-notification-management

Test plan

  • CI make-pact-tests will publish the updated pact to PactFlow
  • Vandoor's pact-provider-verify (mainBranch: true) will pick up the new pact and should now pass

The previous matcher required exactly 1 item in the eventTypes array.
EachLike matches any array with at least 1 item of the correct structure,
which is the correct contract — we care about the shape, not the count.
divolgin
divolgin previously approved these changes May 1, 2026
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit f8be328. Configure here.

Comment thread pacts/replicated-cli-vendor-api.json
@alicenstar alicenstar requested a review from divolgin May 1, 2026 23:12
@alicenstar alicenstar merged commit 8dbb87a into main May 1, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants