Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion dev-packages/cloudflare-integration-tests/runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,9 @@ export function createRunner(...paths: string[]) {
path: string,
options: { headers?: Record<string, string>; data?: BodyInit; expectError?: boolean } = {},
): Promise<T | undefined> {
const url = `http://localhost:${await workerPortPromise}${path}`;
// wrangler only binds this port on 127.0.0.1. `localhost` resolves to ::1 first, where the same
// port number can belong to another wrangler's inspector, which answers 500 "Not yet implemented".
const url = `http://127.0.0.1:${await workerPortPromise}${path}`;
const body = options.data;
const headers = options.headers || {};
const expectError = options.expectError || false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,11 +203,11 @@ it('sends a streamed span envelope with correct spans for a manually started spa
[SENTRY_ENVIRONMENT]: { type: 'string', value: 'production' },
'server.address': {
type: 'string',
value: 'localhost',
value: '127.0.0.1',
},
'url.full': {
type: 'string',
value: expect.stringMatching(/^http:\/\/localhost:.+$/),
value: expect.stringMatching(/^http:\/\/127\.0\.0\.1:.+$/),
},
'url.path': {
type: 'string',
Expand Down Expand Up @@ -247,7 +247,7 @@ it('sends a streamed span envelope with correct spans for a manually started spa
},
'http.request.header.host': {
type: 'array',
value: [expect.stringMatching(/^localhost:.+$/)],
value: [expect.stringMatching(/^127\.0\.0\.1:.+$/)],
},
'http.request.header.sec-fetch-mode': {
type: 'array',
Expand Down
Loading