Skip to content

Commit a77f15e

Browse files
committed
Fix whitespace and tabs in test files
1 parent d36e3ef commit a77f15e

16 files changed

+148
-92
lines changed

test/README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Test node-oracledb
22

3-
*Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.*
3+
*Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.*
44

55
You may not use the identified files except in compliance with the Apache
66
License, Version 2.0 (the "License.")
@@ -116,17 +116,17 @@ This test aims to test the combined usage of external authentication and proxy a
116116

117117
* Enable external authentication on the schema user which you used for testing. See [Documentation for External Authentication](https://oracle.github.io/node-oracledb/doc/api.html#extauth) for more information on external authentication. Then use the following command to enable external authentication in the test suite.
118118

119-
```
120-
export NODE_ORACLEDB_EXTERNALAUTH true
119+
```
120+
export NODE_ORACLEDB_EXTERNALAUTH true
121121
122-
```
122+
```
123123
124124
* Enable proxy authentication on another schema user specified by environment variable `NODE_ORACLEDB_PROXY_SESSION_USER` that connects through the schema user which you used for testing. See [Documentation for Pool Proxy Authentication](https://oracle.github.io/node-oracledb/doc/api.html#pool-proxy-authentication) for more information on proxy authentication. Then use the following command to enable proxy authentication in the test suite.
125125
126-
```
127-
export NODE_ORACLEDB_PROXY_SESSION_USER "Your_Proxy_Authenticating_User"
126+
```
127+
export NODE_ORACLEDB_PROXY_SESSION_USER "Your_Proxy_Authenticating_User"
128128
129-
```
129+
```
130130
131131
132132
## 4. Add Tests

test/dataTypeXML.js

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

33
/******************************************************************************
44
*
@@ -36,26 +36,26 @@ describe('181. dataTypeXML.js', () => {
3636

3737
const tableName = "nodb_tab_xml";
3838
const testRowID = 1;
39-
const testXMLData =
40-
'<Warehouse>\n ' +
39+
const testXMLData =
40+
'<Warehouse>\n ' +
4141
'<WarehouseId>1</WarehouseId>\n ' +
42-
'<WarehouseName>Melbourne, Australia</WarehouseName>\n ' +
42+
'<WarehouseName>Melbourne, Australia</WarehouseName>\n ' +
4343
'<Building>Owned</Building>\n ' +
44-
'<Area>2020</Area>\n ' +
45-
'<Docks>1</Docks>\n ' +
44+
'<Area>2020</Area>\n ' +
45+
'<Docks>1</Docks>\n ' +
4646
'<DockType>Rear load</DockType>\n ' +
47-
'<WaterAccess>false</WaterAccess>\n ' +
48-
'<RailAccess>N</RailAccess>\n ' +
47+
'<WaterAccess>false</WaterAccess>\n ' +
48+
'<RailAccess>N</RailAccess>\n ' +
4949
'<Parking>Garage</Parking>\n ' +
50-
'<VClearance>20</VClearance>\n' +
50+
'<VClearance>20</VClearance>\n' +
5151
'</Warehouse>\n';
5252

5353
before('create table and insert a row', async () => {
5454

5555
try {
5656
const connection = await oracledb.getConnection(dbconfig);
57-
58-
const sql =
57+
58+
const sql =
5959
"BEGIN \n" +
6060
" DECLARE \n" +
6161
" e_table_missing EXCEPTION; \n" +
@@ -79,7 +79,7 @@ describe('181. dataTypeXML.js', () => {
7979
} catch(err) {
8080
should.not.exist(err);
8181
}
82-
82+
8383
try {
8484
const conn = await oracledb.getConnection(dbconfig);
8585

@@ -134,7 +134,7 @@ describe('181. dataTypeXML.js', () => {
134134

135135
let sql = "select xmltype.getclobval(content) as mycontent from " + tableName + " where num = :id";
136136
let bindVar = { id: testRowID };
137-
let options = {
137+
let options = {
138138
outFormat: oracledb.OBJECT,
139139
fetchInfo: { "MYCONTENT": { type: oracledb.STRING } }
140140
};
@@ -157,7 +157,7 @@ describe('181. dataTypeXML.js', () => {
157157
let sql = "select extract(content, '/').getclobval() as mycontent " +
158158
"from " + tableName + " where num = :id";
159159
let bindVar = { id: testRowID };
160-
let options = {
160+
let options = {
161161
outFormat: oracledb.OBJECT,
162162
fetchInfo: { "MYCONTENT": { type: oracledb.STRING } }
163163
};
@@ -196,7 +196,7 @@ describe('181. dataTypeXML.js', () => {
196196

197197
// ORA-19011: Character string buffer too small
198198
it.skip('181.5 inserts data that larger than 4K', async () => {
199-
199+
200200
let ID = 50;
201201
let str = 'a'.repeat(31*1024);
202202
let head = '<data>', tail = '</data>\n';
@@ -222,5 +222,5 @@ describe('181. dataTypeXML.js', () => {
222222
should.not.exist(err);
223223
}
224224
}); // 181.5
225-
226-
});
225+
226+
});

test/deferLibInit.js

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

33
/******************************************************************************
44
*
@@ -37,7 +37,7 @@ describe('182. deferLibInit.js', () => {
3737
before('it only works on Linux', function() {
3838
if (process.platform !== 'linux') this.skip();
3939
});
40-
40+
4141
it('182.1 defers initializatiion of ODPI-C', async () => {
4242
try {
4343
delete process.env.LD_LIBRARY_PATH;
@@ -64,7 +64,7 @@ describe('182. deferLibInit.js', () => {
6464
should.not.exist(err);
6565
}
6666
});
67-
67+
6868
});
6969

7070
async function positiveCase() {
@@ -80,4 +80,4 @@ async function negativeCase() {
8080
async function callMethodCase() {
8181
const { stdout } = await execFile(process.argv[1], ['test/deferLibInit3.js']);
8282
should.exist(stdout);
83-
}
83+
}

test/deferLibInit2.js

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,38 @@
1+
/* Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved. */
2+
3+
/******************************************************************************
4+
*
5+
* You may not use the identified files except in compliance with the Apache
6+
* License, Version 2.0 (the "License.")
7+
*
8+
* You may obtain a copy of the License at
9+
* http://www.apache.org/licenses/LICENSE-2.0.
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
*
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*
18+
* The node-oracledb test suite uses 'mocha', 'should' and 'async'.
19+
* See LICENSE.md for relevant licenses.
20+
*
21+
* NAME
22+
* deferLibInit2.js
23+
*
24+
* DESCRIPTION
25+
* Testing late loading of Oracle Client libraries
26+
*
27+
*****************************************************************************/
28+
129
const oracledb = require('oracledb');
230
const should = require('should');
331

432
describe('deferLibInit2.js', () => {
533

634
it('child process #2 of test/deferLibInit.js', () => {
7-
35+
836
should.throws(
937
() => {
1038
console.log(oracledb.oracleClientVersion);
@@ -13,4 +41,4 @@ describe('deferLibInit2.js', () => {
1341
);
1442
// DPI-1047: 64-bit Oracle Client library cannot be loaded...
1543
});
16-
});
44+
});

test/deferLibInit3.js

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,38 @@
1+
/* Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved. */
2+
3+
/******************************************************************************
4+
*
5+
* You may not use the identified files except in compliance with the Apache
6+
* License, Version 2.0 (the "License.")
7+
*
8+
* You may obtain a copy of the License at
9+
* http://www.apache.org/licenses/LICENSE-2.0.
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
*
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*
18+
* The node-oracledb test suite uses 'mocha', 'should' and 'async'.
19+
* See LICENSE.md for relevant licenses.
20+
*
21+
* NAME
22+
* deferLibInit3.js
23+
*
24+
* DESCRIPTION
25+
* Testing late loading of Oracle Client libraries
26+
*
27+
*****************************************************************************/
28+
129
const oracledb = require('oracledb');
230
const should = require('should');
331
const testsUtil = require('./testsUtil.js');
432
const dbconfig = require('./dbconfig.js');
533

634
describe('deferLibInit3.js', () => {
7-
35+
836
it('child process #3 of test/deferLibInit.js', async () => {
937
let conn;
1038
await testsUtil.assertThrowsAsync(
@@ -15,4 +43,4 @@ describe('deferLibInit3.js', () => {
1543

1644
should.not.exist(conn);
1745
});
18-
});
46+
});

test/executeMany2.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@
2323
*
2424
* DESCRIPTION
2525
* This is a negative test of executeMany().
26-
*
26+
*
2727
* The executeMany(): Binds section of the doc says:
28-
* The first data record determines the number of bind variables,
28+
* The first data record determines the number of bind variables,
2929
* each bind variable's data type, and its name (when binding by name).
3030
*
3131
*****************************************************************************/
@@ -37,9 +37,9 @@ const dbconfig = require('./dbconfig.js');
3737
const testsUtil = require('./testsUtil.js');
3838

3939
describe('172. executeMany2.js', function() {
40-
40+
4141
it('172.1 Negative - incorrect parameters', async () => {
42-
42+
4343
let conn;
4444
let schema = dbconfig.user.toUpperCase();
4545

@@ -54,7 +54,7 @@ describe('172. executeMany2.js', function() {
5454

5555
} catch(err) {
5656
should.not.exist(err);
57-
}
57+
}
5858

5959
await testsUtil.assertThrowsAsync(
6060
async () => {
@@ -123,4 +123,4 @@ describe('172. executeMany2.js', function() {
123123
should.not.exist(err);
124124
}
125125
}); // 172.2
126-
});
126+
});

test/jsObjectGetter2.js

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

33
/******************************************************************************
44
*
@@ -22,7 +22,7 @@
2222
* 171. jsObjectGetter2.js
2323
*
2424
* DESCRIPTION
25-
* It checks the safe use of the Maybe value returned by
25+
* It checks the safe use of the Maybe value returned by
2626
* JS Object Set methods.
2727
*
2828
*****************************************************************************/
@@ -101,7 +101,7 @@ describe('171. jsObjectGetter2.js', () => {
101101
}
102102
});
103103
await conn.execute(sqlInsert, bindVar);
104-
104+
105105
let sqlDrop = "DROP TABLE " + tableName + " PURGE";
106106
await conn.execute(sqlDrop);
107107

@@ -117,4 +117,4 @@ describe('171. jsObjectGetter2.js', () => {
117117
}
118118
}
119119
}); // 171.3
120-
});
120+
});

test/list.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4208,7 +4208,7 @@ Overview of node-oracledb functional tests
42084208
168. soda4.js
42094209
168.1 insertOneAndGet() fetches attributes without content
42104210
168.2 content is null
4211-
168.3 get mediaType
4211+
168.3 get mediaType
42124212

42134213
170. poolDrain.js
42144214
170.1 close pool with force flag, and prevent new connection

test/soda1.js

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

33
/******************************************************************************
44
*
@@ -423,7 +423,7 @@ describe('164. soda1.js', () => {
423423
}); // 164.10
424424

425425
it('164.11 Negative: create collection with invalid metaData value', async () => {
426-
426+
427427
let conn;
428428
try {
429429
conn = await oracledb.getConnection(dbconfig);

0 commit comments

Comments
 (0)