Skip to content

Commit 4e64db2

Browse files
committed
pass db user/name if supplied
1 parent e97c91b commit 4e64db2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

run/idp-sql/test/system.test.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ describe('System Tests', () => {
4343
if (!CLOUD_SQL_CONNECTION_NAME) {
4444
throw Error('"CLOUD_SQL_CONNECTION_NAME" env var not found.');
4545
}
46+
47+
const {DB_NAME} = process.env;
48+
const {DB_USER} = process.env;
4649
const {DB_PASSWORD} = process.env;
4750
if (!DB_PASSWORD) {
4851
throw Error('"DB_PASSWORD" env var not found.');
@@ -71,6 +74,8 @@ describe('System Tests', () => {
7174

7275
if (SERVICE_ACCOUNT) buildCmd += `,_SERVICE_ACCOUNT=${SERVICE_ACCOUNT}`;
7376
if (SAMPLE_VERSION) buildCmd += `,_VERSION=${SAMPLE_VERSION}`;
77+
if (DB_USER) buildCmd += `,_DB_USER=${DB_USER}`;
78+
if (DB_NAME) buildCmd += `,_DB_NAME=${DB_NAME}`;
7479

7580
console.log('Starting Cloud Build...');
7681
execSync(buildCmd, {timeout: 240000, shell: true}); // timeout at 4 mins

0 commit comments

Comments
 (0)