Update external auth test

This commit is contained in:
Christopher Jones 2018-11-27 13:52:24 +11:00
parent 5eda22f318
commit 91aea0b814
2 changed files with 6 additions and 6 deletions

View File

@ -96,18 +96,18 @@ describe('5. externalAuth.js', function() {
}); // 5.1.2
it("5.1.3 throws error when gettting connection from oracledb given only 'user' when externalAuth is enabled", function(done) {
it("5.1.3 throws error when gettting connection from oracledb given only invalid 'user' when externalAuth is enabled", function(done) {
oracledb.getConnection(
{
externalAuth: true,
user: dbConfig.user,
user: "[ invalid_user ]",
connectString: dbConfig.connectString
},
function(err, conn){
should.exist(err);
(err.message).should.startWith("DPI-1032:");
// DPI-1032: user and password should not be set when using external authentication
(err.message).should.startWith("ORA-01017:");
// ORA-01017: invalid username/password; logon denied
should.not.exist(conn);
done();
}
@ -239,7 +239,7 @@ describe('5. externalAuth.js', function() {
describe('5.2 tests only work when externalAuth is configured on DB', function() {
before(function() {
if ( !dbConfig.test.externalAuth ) this.skip();
if ( dbConfig.test.externalAuth !== true) this.skip();
});
it("5.2.1 can get connection from oracledb with external authentication", function(done) {

View File

@ -147,7 +147,7 @@ Overview of node-oracledb functional tests
5.1 tests that work both when DB has configured externalAuth and not configured
5.1.1 can get connection from oracledb with correct user/password when externalAuth is disabled
5.1.2 throws error when getting connection from oracledb with correct user/password when externalAuth is enabled
5.1.3 throws error when gettting connection from oracledb given only 'user' when externalAuth is enabled
5.1.3 throws error when gettting connection from oracledb given only invalid 'user' when externalAuth is enabled
5.1.4 throws error when gettting connection from oracledb given only 'password' when externalAuth is enabled
5.1.5 can get pool from oracledb with user/password when externalAuth is disabled
5.1.6 throws error when getting pool from oracledb given user/password when externalAuth is enabled