Skip to content

Commit b25dc6c

Browse files
thymikeeclaude
andcommitted
test(revyl): record only Revyl API calls in the fixture backend
The fixture listens on an ephemeral localhost port that any process on the host can reach, and a stray `GET /` from one made the exact-path assertion in the lease-start test fail under host load. Requests outside `/api/` are answered 404 and not recorded as the runtime's calls. Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 9df80ce commit b25dc6c

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

‎packages/provider-revyl/src/revyl-backend.fixtures.ts‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,12 @@ export async function startRevylFixtureBackend(
121121
const raw = Buffer.concat(chunks).toString('utf8');
122122
const url = request.url ?? '/';
123123
const method = request.method ?? 'GET';
124+
// The fixture listens on an ephemeral localhost port that any process on the host can reach. A
125+
// request outside Revyl's API is not the runtime's, so it is not recorded as one of its calls.
126+
if (!url.startsWith('/api/')) {
127+
response.writeHead(404).end();
128+
return;
129+
}
124130
const recorded = readJson(raw);
125131
requests.push({
126132
method,

0 commit comments

Comments
 (0)