Skip to content

Commit 96aa889

Browse files
committed
Add another externalAuth test
1 parent a233cfe commit 96aa889

File tree

2 files changed

+28
-2
lines changed

2 files changed

+28
-2
lines changed

test/list.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,10 @@ Overview of node-oracledb functional tests
7070
2.9.1 works after the pool as been terminated
7171
2.10 Close method
7272
2.10.1 close can be used as an alternative to release
73-
73+
2.11 External Authentication
74+
2.11.1 throws error when providing username and password with external authentication
75+
2.11.2 throws error when given with username and without password
76+
2.11.3 throws error when given with password and without username
7477

7578
3. examples.js
7679
3.1 connect.js

test/pool.js

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1020,7 +1020,7 @@ describe('2. pool.js', function() {
10201020

10211021
});
10221022

1023-
it('2.11.2 throws error when providing username', function(done) {
1023+
it('2.11.2 throws error when given with username and without password', function(done) {
10241024

10251025
if(!dbConfig.user) {
10261026
console.error("user/password required.");
@@ -1039,6 +1039,29 @@ describe('2. pool.js', function() {
10391039
}
10401040
);
10411041
}
1042+
1043+
});
1044+
1045+
it('2.11.3 throws error when given with password and without username', function(done) {
1046+
1047+
if(!dbConfig.user) {
1048+
console.error("user/password required.");
1049+
} else {
1050+
oracledb.createPool(
1051+
{
1052+
externalAuth: true,
1053+
password: dbConfig.password,
1054+
connectString: dbConfig.connectString
1055+
},
1056+
function(err, pool) {
1057+
should.exist(err);
1058+
(err.message).should.startWith("DPI-006:");
1059+
should.not.exist(pool);
1060+
done();
1061+
}
1062+
);
1063+
}
1064+
10421065
});
10431066

10441067
}); // 2.11

0 commit comments

Comments
 (0)