From 91aea0b814a7c62b53ce6b63724598ef6782e4f7 Mon Sep 17 00:00:00 2001 From: Christopher Jones Date: Tue, 27 Nov 2018 13:52:24 +1100 Subject: [PATCH] Update external auth test --- test/externalAuth.js | 10 +++++----- test/list.txt | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/test/externalAuth.js b/test/externalAuth.js index e1712a4f..fb988dd0 100644 --- a/test/externalAuth.js +++ b/test/externalAuth.js @@ -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) { diff --git a/test/list.txt b/test/list.txt index 5dc31a0a..deb805fb 100755 --- a/test/list.txt +++ b/test/list.txt @@ -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