Skip to content

Commit

Permalink
chore: fix pg-pool test env (#706)
Browse files Browse the repository at this point in the history
  • Loading branch information
xiao-lix authored and dyladan committed Jan 17, 2020
1 parent 82828b7 commit 25d1028
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
"@types/pg-pool": "^2.0.1",
"@types/shimmer": "^1.0.1",
"codecov": "^3.6.1",
"cross-env": "^6.0.0",
"gts": "^1.1.0",
"mocha": "^6.2.0",
"nyc": "^14.1.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ describe('pg-pool@2.x', () => {
let pool: pgPool<pg.Client>;
const registry = new NodeTracerRegistry();
const logger = new NoopLogger();
const testPostgres = process.env.TEST_POSTGRES; // For CI: assumes local postgres db is already available
const testPostgresLocally = process.env.TEST_POSTGRES_LOCAL; // For local: spins up local postgres db via docker
const testPostgres = process.env.RUN_POSTGRES_TESTS; // For CI: assumes local postgres db is already available
const testPostgresLocally = process.env.RUN_POSTGRES_TESTS_LOCAL; // For local: spins up local postgres db via docker
const shouldTest = testPostgres || testPostgresLocally; // Skips these tests if false (default)

before(function(done) {
Expand Down Expand Up @@ -192,10 +192,10 @@ describe('pg-pool@2.x', () => {
if (!client) {
throw new Error('No client received');
}
release();
assert.ok(client);
runCallbackTest(parentSpan, pgPoolattributes, events, okStatus, 1, 0);
client.query('SELECT NOW()', (err, ret) => {
release();
if (err) {
return done(err);
}
Expand Down

0 comments on commit 25d1028

Please sign in to comment.