Skip to content

Stub DNS in notification delivery tests#2838

Open
robzolkos wants to merge 4 commits intobasecamp:mainfrom
robzolkos:bugfix/notification-delivery-test-dns
Open

Stub DNS in notification delivery tests#2838
robzolkos wants to merge 4 commits intobasecamp:mainfrom
robzolkos:bugfix/notification-delivery-test-dns

Conversation

@robzolkos
Copy link
Copy Markdown
Collaborator

Summary

NotificationDeliveryTest creates a push subscription for fcm.googleapis.com but was relying on live DNS resolution during the test. That makes the test nondeterministic under the SSRF validation added to Push::Subscription, and it recently failed in CI here: https://github.com/basecamp/fizzy/actions/runs/24322726747/job/71011847248. This change makes the test deterministic by stubbing DNS to a known public IP, which matches the existing project pattern for push-subscription tests and prevents unrelated PRs from tripping this flaky setup.

Changes

  • define a public test IP constant in NotificationDeliveryTest
  • call stub_dns_resolution(...) before creating the test push subscription
  • keep the test exercising notification delivery behavior without depending on external DNS

Notes

  • this does not change production behavior
  • it aligns the integration test with other existing tests that already stub DNS around push subscription validation

Copilot AI review requested due to automatic review settings April 13, 2026 13:25
Copy link
Copy Markdown

@claude claude bot left a comment

Choose a reason for hiding this comment

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

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Makes NotificationDeliveryTest deterministic by stubbing DNS resolution before creating the FCM push subscription, avoiding flaky CI failures under SSRF validation.

Changes:

  • Added a public test IP constant to the integration test.
  • Stubbed DNS resolution during test setup before creating the push subscription.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings April 14, 2026 18:05
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@robzolkos robzolkos requested a review from flavorjones April 14, 2026 18:15
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.

3 participants