Test updates

This commit is contained in:
Christopher Jones 2018-03-27 17:04:00 +11:00
parent 47b9697e08
commit b263da9019
4 changed files with 60 additions and 49 deletions

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. */
/* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. */
/******************************************************************************
*
@ -30,8 +30,19 @@
*
*****************************************************************************/
module.exports = {
user : process.env.NODE_ORACLEDB_USER || "hr",
password : process.env.NODE_ORACLEDB_PASSWORD || "welcome",
connectString : process.env.NODE_ORACLEDB_CONNECTIONSTRING || "localhost/orcl"
};
var config = {};
config.user = process.env.NODE_ORACLEDB_USER || 'hr';
config.password = process.env.NODE_ORACLEDB_PASSWORD || 'hr';
config.connectString = process.env.NODE_ORACLEDB_CONNECTIONSTRING || 'localhost/orcl';
// Has external authentication set up? Negative by default.
config.externalAuth = process.env.NODE_ORACLEDB_EXTERNALAUTH || false;
// Have you got DBA privilege? Positive by default.
config.DBA_PRIVILEGE = process.env.NODE_DBA_PRIVILEGE || true;
config.DBA_user = process.env.NODE_ORACLEDB_DBA_USER || 'sys';
config.DBA_password = process.env.NODE_ORACLEDB_DBA_PASSWORD || 'oracle';
module.exports = config;

View File

@ -79,7 +79,6 @@ Overview of node-oracledb functional tests
2.11.2 error occurs at getConnection() when poolMin is the default value 0
2.12 connectionString alias
2.12.1 allows connectionString to be used as an alias for connectString
2.12.2 favors connectString if both connectString and connectionString are passed
3. examples.js
3.1 connect.js
@ -4086,3 +4085,42 @@ Overview of node-oracledb functional tests
159.1 set the end-to-end tracing attribute - module
159.2 set the tracing attribute - action
159.3 set the tracing attribure - clientId
160. editionTest.js
160.1 Default. No edition. Direct connection.
160.2 Default. No edition. Pooled connection.
160.3 Direct connection. Set edition at getting connection.
160.4 Pooled connection. Set edition at creating pool.
160.5 Direct connection. Change session edition.
160.6 Pooled connection. Change session edition.
160.7 sets edition globally. Direct connection.
160.8 sets edition globally. Pooled connection.
160.9 Negative - sets nonexistent edition globally
160.10 Direct connection. Set nonexistent edition.
160.11 Pooled connection. Set nonexistent edition.
160.12 sets to ora$base with direct connection
160.13 resets to ora$base in direct connection
160.14 sets to ora$base with pooled connection
160.15 sets to ora$base globally
160.16 overrides the global setting. Direct connection
160.17 sets to empty string. Direct connection.
160.18 Negative - invalid type. Direct connection.
160.19 Negative - invalid type. Pooled connection.
160.20 sets ORA_EDITION. Direct connection.
160.21 sets ORA_EDITION. Pooled connection.
160.22 sets ORA_EDITION. Direct connection. Set edition at getting connection.
160.23 sets ORA_EDITION. Pooled connection. Set edition at creating pool.
160.24 Negative - Sets ORA_EDITION with nonexistent value. Direct connection.
160.25 Negative - Sets ORA_EDITION with nonexistent value. Pooled connection.
161. changePassword.js
161.1 basic case
161.2 pooled connection
161.3 DBA changes password
161.4 connects with an expired password
161.5 for DBA, the original password is ignored
161.6 Negative: basic case, wrong original password
161.7 Negative: basic case. invalid parameter
161.8 Negative: non-DBA tries to change the password
161.9 Negative: invalid type of 'newPassword'
161.10 sets "newPassword" to be an empty string. password unchanged

View File

@ -184,4 +184,6 @@ test/fetchArraySize9.js
test/maxRows.js
test/insertAll.js
test/end2endTracing.js
test/end2endTracing.js
test/editionTest.js
test/changePassword.js

View File

@ -1056,46 +1056,6 @@ describe('2. pool.js', function() {
);
});
it('2.12.2 favors connectString if both connectString and connectionString are passed', function(done) {
oracledb.createPool(
{
user: dbConfig.user,
password: dbConfig.password,
connectString: 'this is wrong',
connectionString: dbConfig.connectString,
poolMin: 1,
poolMax: 1,
poolIncrement: 0
},
function(err, pool) {
should.exist(err);
should.not.exist(pool);
oracledb.createPool(
{
user: dbConfig.user,
password: dbConfig.password,
connectString: dbConfig.connectString,
connectionString: 'this is wrong',
poolMin: 1,
poolMax: 1,
poolIncrement: 0
},
function(err, pool) {
should.not.exist(err);
pool.should.be.ok();
pool.close(function(err) {
should.not.exist(err);
done();
});
}
);
}
);
});
}); // 2.12
});
});