Skip to content

Commit 7eb82c7

Browse files
committed
attempt proxy powered
1 parent 2cb4f04 commit 7eb82c7

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

run/idp-sql/ci-setup.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@
22
"env": {
33
"SERVICE_NAME": "idp-sql-${RUN_ID}",
44
"SAMPLE_VERSION": "${RUN_ID}",
5-
"CLOUD_SQL_CONNECTION_NAME": "nodejs-docs-samples-tests:us-central1:postgres-ci",
6-
"DB_NAME": "kokoro_ci",
7-
"DB_USER": "kokoro_ci"
5+
"CLOUD_SQL_CONNECTION_NAME": "nodejs-docs-samples-tests:us-central1:test-postgres-instance",
6+
"DB_NAME": "ci-database",
7+
"DB_USER": "ci-user"
88
},
99
"secrets": {
1010
"IDP_KEY": "nodejs-docs-samples-tests/nodejs-docs-samples-idp-key",
11-
"DB_PASSWORD": "nodejs-docs-samples-tests/nodejs-docs-samples-sql-password"
12-
}
11+
"DB_PASSWORD": "nodejs-docs-samples-tests/nodejs-docs-samples-test-postgres-instance-ci-user-password" }
1312
}

run/idp-sql/package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,11 @@
1515
"scripts": {
1616
"start": "node index.js",
1717
"unit-test": "c8 mocha -p -j 2 test/app.test.js --timeout=120000 --exit",
18-
"system-test": "c8 mocha -p -j 2 test/system.test.js --timeout=1800000 --exit",
18+
"system-test": "npm -- run start-proxy && c8 mocha -p -j 2 test/system.test.js --timeout=1800000 --exit",
1919
"all-test": "npm run unit-test && npm run system-test",
20-
"test": "npm -- run all-test"
20+
"test": "npm -- run all-test",
21+
"start-proxy": "! pgrep cloud_sql_proxy > /dev/null && cloud_sql_proxy -dir=/cloudsql -instances=$INSTANCE_CONNECTION_NAME &",
22+
2123
},
2224
"dependencies": {
2325
"express": "^4.16.2",

0 commit comments

Comments
 (0)