Skip to content

Commit 7738361

Browse files
committed
Allow the edition test to run with Node 6
1 parent 6455186 commit 7738361

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

test/editionTest.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,21 @@ var oracledb = require('oracledb');
3131
var should = require('should');
3232
var async = require('async');
3333
var dbConfig = require('./dbconfig.js');
34-
var testsUtil = require('./testsUtil.js');
34+
35+
function generateRandomPassword(length) {
36+
let result = "";
37+
const choices = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
38+
for (let i = 0; i < length; i++) {
39+
result += choices.charAt(Math.floor(Math.random() * choices.length));
40+
}
41+
return result;
42+
}
3543

3644
describe('160. editionTest.js', function() {
3745

3846
var dbaConn;
3947
var isRunnable;
40-
var nodbSchemaEditionPassword = testsUtil.generateRandomPassword();
48+
var nodbSchemaEditionPassword = generateRandomPassword(6);
4149

4250
before(function(done) {
4351
var conn;

0 commit comments

Comments
 (0)