Skip to content

Commit b263da9

Browse files
committed
Test updates
1 parent 47b9697 commit b263da9

File tree

4 files changed

+60
-49
lines changed

4 files changed

+60
-49
lines changed

test/dbconfig.js

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. */
1+
/* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. */
22

33
/******************************************************************************
44
*
@@ -30,8 +30,19 @@
3030
*
3131
*****************************************************************************/
3232

33-
module.exports = {
34-
user : process.env.NODE_ORACLEDB_USER || "hr",
35-
password : process.env.NODE_ORACLEDB_PASSWORD || "welcome",
36-
connectString : process.env.NODE_ORACLEDB_CONNECTIONSTRING || "localhost/orcl"
37-
};
33+
var config = {};
34+
35+
config.user = process.env.NODE_ORACLEDB_USER || 'hr';
36+
config.password = process.env.NODE_ORACLEDB_PASSWORD || 'hr';
37+
config.connectString = process.env.NODE_ORACLEDB_CONNECTIONSTRING || 'localhost/orcl';
38+
39+
// Has external authentication set up? Negative by default.
40+
config.externalAuth = process.env.NODE_ORACLEDB_EXTERNALAUTH || false;
41+
42+
// Have you got DBA privilege? Positive by default.
43+
config.DBA_PRIVILEGE = process.env.NODE_DBA_PRIVILEGE || true;
44+
45+
config.DBA_user = process.env.NODE_ORACLEDB_DBA_USER || 'sys';
46+
config.DBA_password = process.env.NODE_ORACLEDB_DBA_PASSWORD || 'oracle';
47+
48+
module.exports = config;

test/list.txt

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ Overview of node-oracledb functional tests
7979
2.11.2 error occurs at getConnection() when poolMin is the default value 0
8080
2.12 connectionString alias
8181
2.12.1 allows connectionString to be used as an alias for connectString
82-
2.12.2 favors connectString if both connectString and connectionString are passed
8382

8483
3. examples.js
8584
3.1 connect.js
@@ -4086,3 +4085,42 @@ Overview of node-oracledb functional tests
40864085
159.1 set the end-to-end tracing attribute - module
40874086
159.2 set the tracing attribute - action
40884087
159.3 set the tracing attribure - clientId
4088+
4089+
160. editionTest.js
4090+
160.1 Default. No edition. Direct connection.
4091+
160.2 Default. No edition. Pooled connection.
4092+
160.3 Direct connection. Set edition at getting connection.
4093+
160.4 Pooled connection. Set edition at creating pool.
4094+
160.5 Direct connection. Change session edition.
4095+
160.6 Pooled connection. Change session edition.
4096+
160.7 sets edition globally. Direct connection.
4097+
160.8 sets edition globally. Pooled connection.
4098+
160.9 Negative - sets nonexistent edition globally
4099+
160.10 Direct connection. Set nonexistent edition.
4100+
160.11 Pooled connection. Set nonexistent edition.
4101+
160.12 sets to ora$base with direct connection
4102+
160.13 resets to ora$base in direct connection
4103+
160.14 sets to ora$base with pooled connection
4104+
160.15 sets to ora$base globally
4105+
160.16 overrides the global setting. Direct connection
4106+
160.17 sets to empty string. Direct connection.
4107+
160.18 Negative - invalid type. Direct connection.
4108+
160.19 Negative - invalid type. Pooled connection.
4109+
160.20 sets ORA_EDITION. Direct connection.
4110+
160.21 sets ORA_EDITION. Pooled connection.
4111+
160.22 sets ORA_EDITION. Direct connection. Set edition at getting connection.
4112+
160.23 sets ORA_EDITION. Pooled connection. Set edition at creating pool.
4113+
160.24 Negative - Sets ORA_EDITION with nonexistent value. Direct connection.
4114+
160.25 Negative - Sets ORA_EDITION with nonexistent value. Pooled connection.
4115+
4116+
161. changePassword.js
4117+
161.1 basic case
4118+
161.2 pooled connection
4119+
161.3 DBA changes password
4120+
161.4 connects with an expired password
4121+
161.5 for DBA, the original password is ignored
4122+
161.6 Negative: basic case, wrong original password
4123+
161.7 Negative: basic case. invalid parameter
4124+
161.8 Negative: non-DBA tries to change the password
4125+
161.9 Negative: invalid type of 'newPassword'
4126+
161.10 sets "newPassword" to be an empty string. password unchanged

test/opts/mocha.opts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,4 +184,6 @@ test/fetchArraySize9.js
184184
test/maxRows.js
185185
test/insertAll.js
186186

187-
test/end2endTracing.js
187+
test/end2endTracing.js
188+
test/editionTest.js
189+
test/changePassword.js

test/pool.js

Lines changed: 1 addition & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1056,46 +1056,6 @@ describe('2. pool.js', function() {
10561056
);
10571057
});
10581058

1059-
it('2.12.2 favors connectString if both connectString and connectionString are passed', function(done) {
1060-
oracledb.createPool(
1061-
{
1062-
user: dbConfig.user,
1063-
password: dbConfig.password,
1064-
connectString: 'this is wrong',
1065-
connectionString: dbConfig.connectString,
1066-
poolMin: 1,
1067-
poolMax: 1,
1068-
poolIncrement: 0
1069-
},
1070-
function(err, pool) {
1071-
should.exist(err);
1072-
should.not.exist(pool);
1073-
1074-
oracledb.createPool(
1075-
{
1076-
user: dbConfig.user,
1077-
password: dbConfig.password,
1078-
connectString: dbConfig.connectString,
1079-
connectionString: 'this is wrong',
1080-
poolMin: 1,
1081-
poolMax: 1,
1082-
poolIncrement: 0
1083-
},
1084-
function(err, pool) {
1085-
should.not.exist(err);
1086-
1087-
pool.should.be.ok();
1088-
1089-
pool.close(function(err) {
1090-
should.not.exist(err);
1091-
1092-
done();
1093-
});
1094-
}
1095-
);
1096-
}
1097-
);
1098-
});
10991059
}); // 2.12
11001060

1101-
});
1061+
});

0 commit comments

Comments
 (0)