Skip to content

Commit

Permalink
ref: move event proxy server
Browse files Browse the repository at this point in the history
  • Loading branch information
mydea committed Jul 13, 2023
1 parent 4ec760a commit 5497bb4
Show file tree
Hide file tree
Showing 9 changed files with 7 additions and 22 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { startEventProxyServer } from '../../test-utils/event-proxy-server';
import { startEventProxyServer } from './event-proxy-server';

startEventProxyServer({
port: 3031,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { test, expect } from '@playwright/test';
import { waitForError } from '../../../test-utils/event-proxy-server';
import { waitForError } from '../event-proxy-server';

test.describe('dev mode error symbolification', () => {
if (process.env.TEST_ENV !== 'development') {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { test, expect } from '@playwright/test';
import { waitForTransaction, waitForError } from '../../../test-utils/event-proxy-server';
import { waitForTransaction, waitForError } from '../event-proxy-server';

test('Should create a transaction for edge routes', async ({ request }) => {
test.skip(process.env.TEST_ENV === 'development', "Doesn't work in dev mode.");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { test, expect } from '@playwright/test';
import { waitForError } from '../../../test-utils/event-proxy-server';
import { waitForError } from '../event-proxy-server';
import axios, { AxiosError } from 'axios';

const authToken = process.env.E2E_TEST_AUTH_TOKEN;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { test, expect } from '@playwright/test';
import { waitForTransaction, waitForError } from '../../../test-utils/event-proxy-server';
import { waitForTransaction, waitForError } from '../event-proxy-server';

test('Should create a transaction for middleware', async ({ request }) => {
test.skip(process.env.TEST_ENV === 'development', "Doesn't work in dev mode.");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { test } from '@playwright/test';
import { waitForTransaction } from '../../../test-utils/event-proxy-server';
import { waitForTransaction } from '../event-proxy-server';

if (process.env.TEST_ENV === 'production') {
// TODO: Fix that this is flakey on dev server - might be an SDK bug
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { test, expect } from '@playwright/test';
import { waitForTransaction } from '../../../test-utils/event-proxy-server';
import { waitForTransaction } from '../event-proxy-server';
import axios, { AxiosError } from 'axios';

const authToken = process.env.E2E_TEST_AUTH_TOKEN;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,3 @@
// This is vendored from packages/e2e-tests/test-utils/event-proxy-server.ts
// This is done because otherwise we were getting `ERR_MODULE_NOT_FOUND`:
//
// CustomError: Cannot find module '/sentry-javascript/packages/e2e-tests/test-utils/event-proxy-server' imported from /sentry-javascript/packages/e2e-tests/test-applications/sveltekit/start-event-proxy.ts
// at finalizeResolution (/sentry-javascript/packages/e2e-tests/test-applications/sveltekit/node_modules/ts-node/dist-raw/node-internal-modules-esm-resolve.js:366:11)
// at moduleResolve (/sentry-javascript/packages/e2e-tests/test-applications/sveltekit/node_modules/ts-node/dist-raw/node-internal-modules-esm-resolve.js:801:10)
// at Object.defaultResolve (/sentry-javascript/packages/e2e-tests/test-applications/sveltekit/node_modules/ts-node/dist-raw/node-internal-modules-esm-resolve.js:912:11)
// at /sentry-javascript/packages/e2e-tests/test-applications/sveltekit/node_modules/ts-node/src/esm.ts:218:35
// at entrypointFallback (/sentry-javascript/packages/e2e-tests/test-applications/sveltekit/node_modules/ts-node/src/esm.ts:168:34)
// at /sentry-javascript/packages/e2e-tests/test-applications/sveltekit/node_modules/ts-node/src/esm.ts:217:14
// at addShortCircuitFlag (/sentry-javascript/packages/e2e-tests/test-applications/sveltekit/node_modules/ts-node/src/esm.ts:409:21)
// at resolve (/sentry-javascript/packages/e2e-tests/test-applications/sveltekit/node_modules/ts-node/src/esm.ts:197:12)
// at resolve (/sentry-javascript/packages/e2e-tests/test-applications/sveltekit/node_modules/ts-node/src/child/child-loader.ts:15:39)
// at nextResolve (node:internal/modules/esm/loader:163:28)

import type { Envelope, EnvelopeItem, Event } from '@sentry/types';
import { parseEnvelope } from '@sentry/utils';
import * as fs from 'fs';
Expand Down

0 comments on commit 5497bb4

Please sign in to comment.