Skip to content

Commit

Permalink
Revert "test(node): Add pg-native integration tests" (#15464)
Browse files Browse the repository at this point in the history
Reverts #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.
  • Loading branch information
AbhiPrasad authored Feb 21, 2025
1 parent 8f9f42c commit 08569e6
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 208 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -713,10 +713,6 @@ jobs:
with:
dependency_cache_key: ${{ needs.job_build.outputs.dependency_cache_key }}

- name: Build `libpq`
run: yarn libpq:build
working-directory: dev-packages/node-integration-tests

- name: Overwrite typescript version
if: matrix.typescript == '3.8'
run: node ./scripts/use-ts-3_8.js
Expand Down
4 changes: 1 addition & 3 deletions dev-packages/node-integration-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
"build:types": "tsc -p tsconfig.types.json",
"clean": "rimraf -g **/node_modules && run-p clean:script",
"clean:script": "node scripts/clean.js",
"libpq:build": "npm rebuild libpq",
"express-v5-install": "cd suites/express-v5 && yarn --no-lockfile",
"lint": "eslint . --format stylish",
"fix": "eslint . --format stylish --fix",
Expand Down Expand Up @@ -63,8 +62,7 @@
"nock": "^13.5.5",
"node-cron": "^3.0.3",
"node-schedule": "^2.1.1",
"pg": "^8.13.1",
"pg-native": "3.2.0",
"pg": "^8.7.3",
"proxy": "^2.1.1",
"redis-4": "npm:redis@^4.6.14",
"reflect-metadata": "0.2.1",
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -53,54 +53,4 @@ describe('postgres auto instrumentation', () => {
.expect({ transaction: EXPECTED_TRANSACTION })
.start(done);
});

test('should auto-instrument `pg-native` package', done => {
const EXPECTED_TRANSACTION = {
transaction: 'Test Transaction',
spans: expect.arrayContaining([
expect.objectContaining({
data: expect.objectContaining({
'db.system': 'postgresql',
'db.name': 'tests',
'sentry.origin': 'manual',
'sentry.op': 'db',
}),
description: 'pg.connect',
op: 'db',
status: 'ok',
}),
expect.objectContaining({
data: expect.objectContaining({
'db.system': 'postgresql',
'db.name': 'tests',
'db.statement': 'INSERT INTO "NativeUser" ("email", "name") VALUES ($1, $2)',
'sentry.origin': 'auto.db.otel.postgres',
'sentry.op': 'db',
}),
description: 'INSERT INTO "NativeUser" ("email", "name") VALUES ($1, $2)',
op: 'db',
status: 'ok',
origin: 'auto.db.otel.postgres',
}),
expect.objectContaining({
data: expect.objectContaining({
'db.system': 'postgresql',
'db.name': 'tests',
'db.statement': 'SELECT * FROM "NativeUser"',
'sentry.origin': 'auto.db.otel.postgres',
'sentry.op': 'db',
}),
description: 'SELECT * FROM "NativeUser"',
op: 'db',
status: 'ok',
origin: 'auto.db.otel.postgres',
}),
]),
};

createRunner(__dirname, 'scenario-native.js')
.withDockerCompose({ workingDirectory: [__dirname], readyMatches: ['port 5432'] })
.expect({ transaction: EXPECTED_TRANSACTION })
.start(done);
});
});
Loading

0 comments on commit 08569e6

Please sign in to comment.