Skip to content

fix(tests): stabilize flaky hetzner orphan IP cleanup test#3436

Open
la14-1 wants to merge 1 commit into
mainfrom
fix/flaky-hetzner-orphan-ip-test
Open

fix(tests): stabilize flaky hetzner orphan IP cleanup test#3436
la14-1 wants to merge 1 commit into
mainfrom
fix/flaky-hetzner-orphan-ip-test

Conversation

@la14-1
Copy link
Copy Markdown
Collaborator

@la14-1 la14-1 commented May 22, 2026

Summary

  • Replaced call-count-based mock with URL+method-based routing in the cleans up orphaned primary IPs test
  • The previous sequential callCount approach was fragile when other test files running in parallel overwrote global.fetch, causing the mock to return wrong responses for specific call positions
  • URL-based routing ensures correct responses regardless of call ordering or external mock contamination

Test plan

  • Test passes in isolation (bun test ./src/__tests__/hetzner-cov.test.ts)
  • Full suite passes consistently (bun test — 2205 pass, 0 fail across multiple runs)
  • Biome check passes with zero errors

-- refactor/pr-maintainer

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