[GH-ISSUE #6951] Egress Profiles deletion QA mock can bypass health readback fixture #11644

Open
opened 2026-08-05 01:30:15 -04:00 by saavagebueno · 1 comment
Owner

Originally created by @BearMaxDD on GitHub (Jul 28, 2026).
Original GitHub issue: https://github.com/netbirdio/netbird/issues/6951

What happened

The Egress Profiles deletion QA flow uses a broad request mock for profile 41. That mock also matches the profile health readback request. Because the deletion mock is registered later, the health request can be forwarded to the real backend instead of using the deterministic health fixture.

As a result, the health verification scenario depends on backend availability and can produce misleading results or expose a real management endpoint during an otherwise mocked test.

What I expected

The QA flow should intercept only the DELETE request for the egress profile. GET requests for /egress-profiles/41/health must continue to use the configured health fixture, and the DELETE request must be asserted with the current profile version.

Steps to reproduce

  1. Run the Route Control Egress Profiles Playwright QA tests with the profile fixture whose ID is 41.
  2. Register a route mock matching /route-control/egress-profiles/41* after the profile health mock.
  3. Open the Egress Profiles page and allow the selected profile health readback to run.
  4. Observe that the /41/health request may be forwarded to the real backend rather than fulfilled by the health fixture.

Additional context

The broad match covers both the profile DELETE endpoint and the /health subresource. Non-DELETE requests should fall back to the earlier route handler so the test remains deterministic and isolated from backend state.

Originally created by @BearMaxDD on GitHub (Jul 28, 2026). Original GitHub issue: https://github.com/netbirdio/netbird/issues/6951 ## What happened The Egress Profiles deletion QA flow uses a broad request mock for profile `41`. That mock also matches the profile health readback request. Because the deletion mock is registered later, the health request can be forwarded to the real backend instead of using the deterministic health fixture. As a result, the health verification scenario depends on backend availability and can produce misleading results or expose a real management endpoint during an otherwise mocked test. ## What I expected The QA flow should intercept only the DELETE request for the egress profile. GET requests for `/egress-profiles/41/health` must continue to use the configured health fixture, and the DELETE request must be asserted with the current profile version. ## Steps to reproduce 1. Run the Route Control Egress Profiles Playwright QA tests with the profile fixture whose ID is `41`. 2. Register a route mock matching `/route-control/egress-profiles/41*` after the profile health mock. 3. Open the Egress Profiles page and allow the selected profile health readback to run. 4. Observe that the `/41/health` request may be forwarded to the real backend rather than fulfilled by the health fixture. ## Additional context The broad match covers both the profile DELETE endpoint and the `/health` subresource. Non-DELETE requests should fall back to the earlier route handler so the test remains deterministic and isolated from backend state.
Author
Owner

@linear-code[bot] commented on GitHub (Jul 28, 2026):

NET-1451

<!-- gh-comment-id:5109698001 --> @linear-code[bot] commented on GitHub (Jul 28, 2026): <!-- linear-linkback --> <p><a href="https://linear.app/netbird/issue/NET-1451">NET-1451</a></p>
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#11644