Skip to content

Commit 51e688a

Browse files
committed
Test config optimizations
1 parent 02d49cc commit 51e688a

File tree

1 file changed

+9
-17
lines changed

1 file changed

+9
-17
lines changed

test/dbconfig.js

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2015, 2023, Oracle and/or its affiliates. */
1+
/* Copyright (c) 2015, 2024, Oracle and/or its affiliates. */
22

33
/******************************************************************************
44
*
@@ -65,10 +65,8 @@ if (process.env.NODE_ORACLEDB_CONNECTIONSTRING) {
6565
}
6666

6767
if (process.env.NODE_ORACLEDB_EXTERNALAUTH) {
68-
let eauth = process.env.NODE_ORACLEDB_EXTERNALAUTH;
69-
eauth = String(eauth);
70-
eauth = eauth.toLowerCase();
71-
if (eauth == 'true') {
68+
const eauth = process.env.NODE_ORACLEDB_EXTERNALAUTH;
69+
if (eauth.toLowerCase() === 'true') {
7270
config.test.externalAuth = true;
7371
}
7472
}
@@ -90,19 +88,15 @@ if (process.env.NODE_ORACLEDB_PASSWORD) {
9088
}
9189

9290
if (process.env.NODE_ORACLEDB_QA) {
93-
let isQA = process.env.NODE_ORACLEDB_QA;
94-
isQA = String(isQA);
95-
isQA = isQA.toLowerCase();
96-
if (isQA == 'true') {
91+
const isQA = process.env.NODE_ORACLEDB_QA;
92+
if (isQA.toLowerCase() === 'true') {
9793
config.test.NODE_ORACLEDB_QA = true;
9894
}
9995
}
10096

10197
if (process.env.NODE_ORACLEDB_DBA_PRIVILEGE) {
102-
let priv = process.env.NODE_ORACLEDB_DBA_PRIVILEGE;
103-
priv = String(priv);
104-
priv = priv.toLowerCase();
105-
if (priv == 'true') {
98+
const priv = process.env.NODE_ORACLEDB_DBA_PRIVILEGE;
99+
if (priv.toLowerCase() == 'true') {
106100
config.test.DBA_PRIVILEGE = true;
107101
}
108102
}
@@ -132,10 +126,8 @@ if (process.env.NODE_ORACLEDB_PROXY_SESSION_USER) {
132126
}
133127

134128
if (process.env.NODE_PRINT_DEBUG_MESSAGE) {
135-
let printDebugMsg = process.env.NODE_PRINT_DEBUG_MESSAGE;
136-
printDebugMsg = String(printDebugMsg);
137-
printDebugMsg = printDebugMsg.toLowerCase();
138-
if (printDebugMsg == 'true') {
129+
const printDebugMsg = process.env.NODE_PRINT_DEBUG_MESSAGE;
130+
if (printDebugMsg.toLowerCase() == 'true') {
139131
config.test.printDebugMsg = true;
140132
}
141133
}

0 commit comments

Comments
 (0)