Skip to content

Commit 08569e6

Browse files
authored
Revert "test(node): Add pg-native integration tests" (getsentry#15464)
Reverts getsentry#15206 This PR requires `libpq` for `yarn install` to be complete, so going to revert this. Let's put this requirement into the docker image instead.
1 parent 8f9f42c commit 08569e6

File tree

5 files changed

+42
-208
lines changed

5 files changed

+42
-208
lines changed

.github/workflows/build.yml

-4
Original file line numberDiff line numberDiff line change
@@ -713,10 +713,6 @@ jobs:
713713
with:
714714
dependency_cache_key: ${{ needs.job_build.outputs.dependency_cache_key }}
715715

716-
- name: Build `libpq`
717-
run: yarn libpq:build
718-
working-directory: dev-packages/node-integration-tests
719-
720716
- name: Overwrite typescript version
721717
if: matrix.typescript == '3.8'
722718
run: node ./scripts/use-ts-3_8.js

dev-packages/node-integration-tests/package.json

+1-3
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
"build:types": "tsc -p tsconfig.types.json",
1717
"clean": "rimraf -g **/node_modules && run-p clean:script",
1818
"clean:script": "node scripts/clean.js",
19-
"libpq:build": "npm rebuild libpq",
2019
"express-v5-install": "cd suites/express-v5 && yarn --no-lockfile",
2120
"lint": "eslint . --format stylish",
2221
"fix": "eslint . --format stylish --fix",
@@ -63,8 +62,7 @@
6362
"nock": "^13.5.5",
6463
"node-cron": "^3.0.3",
6564
"node-schedule": "^2.1.1",
66-
"pg": "^8.13.1",
67-
"pg-native": "3.2.0",
65+
"pg": "^8.7.3",
6866
"proxy": "^2.1.1",
6967
"redis-4": "npm:redis@^4.6.14",
7068
"reflect-metadata": "0.2.1",

dev-packages/node-integration-tests/suites/tracing/postgres/scenario-native.js

-47
This file was deleted.

dev-packages/node-integration-tests/suites/tracing/postgres/test.ts

-50
Original file line numberDiff line numberDiff line change
@@ -53,54 +53,4 @@ describe('postgres auto instrumentation', () => {
5353
.expect({ transaction: EXPECTED_TRANSACTION })
5454
.start(done);
5555
});
56-
57-
test('should auto-instrument `pg-native` package', done => {
58-
const EXPECTED_TRANSACTION = {
59-
transaction: 'Test Transaction',
60-
spans: expect.arrayContaining([
61-
expect.objectContaining({
62-
data: expect.objectContaining({
63-
'db.system': 'postgresql',
64-
'db.name': 'tests',
65-
'sentry.origin': 'manual',
66-
'sentry.op': 'db',
67-
}),
68-
description: 'pg.connect',
69-
op: 'db',
70-
status: 'ok',
71-
}),
72-
expect.objectContaining({
73-
data: expect.objectContaining({
74-
'db.system': 'postgresql',
75-
'db.name': 'tests',
76-
'db.statement': 'INSERT INTO "NativeUser" ("email", "name") VALUES ($1, $2)',
77-
'sentry.origin': 'auto.db.otel.postgres',
78-
'sentry.op': 'db',
79-
}),
80-
description: 'INSERT INTO "NativeUser" ("email", "name") VALUES ($1, $2)',
81-
op: 'db',
82-
status: 'ok',
83-
origin: 'auto.db.otel.postgres',
84-
}),
85-
expect.objectContaining({
86-
data: expect.objectContaining({
87-
'db.system': 'postgresql',
88-
'db.name': 'tests',
89-
'db.statement': 'SELECT * FROM "NativeUser"',
90-
'sentry.origin': 'auto.db.otel.postgres',
91-
'sentry.op': 'db',
92-
}),
93-
description: 'SELECT * FROM "NativeUser"',
94-
op: 'db',
95-
status: 'ok',
96-
origin: 'auto.db.otel.postgres',
97-
}),
98-
]),
99-
};
100-
101-
createRunner(__dirname, 'scenario-native.js')
102-
.withDockerCompose({ workingDirectory: [__dirname], readyMatches: ['port 5432'] })
103-
.expect({ transaction: EXPECTED_TRANSACTION })
104-
.start(done);
105-
});
10656
});

0 commit comments

Comments
 (0)