1
1
# Test node-oracledb
2
2
3
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.*
3
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.*
4
4
5
5
You may not use the identified files except in compliance with the Apache
6
6
License, Version 2.0 (the "License.")
@@ -15,11 +15,20 @@ WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
15
See the License for the specific language governing permissions and
16
16
limitations under the License.
17
17
18
- The node-oracledb test suite uses 'mocha', 'should' and 'async'.
19
- See LICENSE.md for relevant licenses.
18
+ The node-oracledb test suite uses 'mocha', 'should' and 'async'. See
19
+ [ LICENSE] ( https://github.com/oracle/node-oracledb/blob/master/LICENSE.md )
20
+ for relevant licenses.
20
21
21
22
## 1. Preparations for running tests
22
23
24
+ See [ INSTALL] ( https://github.com/oracle/node-oracledb/blob/master/INSTALL.md )
25
+ for installation requirements and more details.
26
+
27
+ Note: the
28
+ [ test suite] ( https://github.com/oracle/node-oracledb/tree/master/test )
29
+ is in GitHub. From node-oracledb 1.9.1 it is not included when
30
+ installing from npmjs.com with ` npm install oracledb ` .
31
+
23
32
### 1.1 Create a working directory
24
33
25
34
```
@@ -29,13 +38,7 @@ cd <some-directory>
29
38
30
39
### 1.2 Get node-oracledb from GitHub
31
40
32
- See [ INSTALL] ( https://github.com/oracle/node-oracledb/blob/master/INSTALL.md )
33
- for installation requirements and more details.
34
-
35
- Note: test suite ships with GitHub repository. We have not provided tests with
36
- 'npm install oracledb' from npmjs.com since 1.9.1.
37
-
38
- Clone project repository to local
41
+ Clone the project repository:
39
42
40
43
```
41
44
cd <some-directory>
@@ -49,9 +52,9 @@ cd <some-directory>/node-oracledb
49
52
npm install
50
53
```
51
54
52
- Running ` npm install ` within node-oracledb/ directory will recompile
53
- oracledb module and install all its dependent modules which are listed
54
- in the ` devDependencies ` field of ` package.json ` file. Thus, 'mocha', 'async'
55
+ Running ` npm install ` within the node-oracledb/ directory will recompile
56
+ oracledb and install all its dependent modules. These are listed
57
+ in the ` devDependencies ` field of ` package.json ` file. Thus, 'mocha', 'async'
55
58
and 'should' modules are installed by this command.
56
59
57
60
The test suite uses [ mocha] ( https://www.npmjs.com/package/mocha ) ,
@@ -60,8 +63,8 @@ The test suite uses [mocha](https://www.npmjs.com/package/mocha),
60
63
61
64
### 1.4 Configure Database credentials
62
65
63
- The database credentials for node-oracledb test suite are defined in dbconfig.js file .
64
- You can set the credentials via environment variables or dbconfig.js file.
66
+ The database credentials for node-oracledb test suite are defined in ` dbconfig.js ` .
67
+ They can also be set via environment variables shown in that file.
65
68
66
69
67
70
```
@@ -77,20 +80,20 @@ module.exports = {
77
80
};
78
81
```
79
82
80
- Note: running test suite requires the schema that provided by credentials
81
- having below priviledges:
82
- - CREATE TABLE
83
- - CREATE SESSION
84
- - CREATE PROCEDURE
85
- - CREATE SEQUENCE
86
- - CREATE TRIGGER
87
-
88
83
To use external authentication, set the ` externalAuth ` property to
89
84
` true ` . Also make sure Oracle Database and the authentication service
90
85
have been appropriately configured. See
91
86
[ Documentation for External Authentication] ( https://github.com/oracle/node-oracledb/blob/master/doc/api.md#extauth )
92
87
for more details.
93
88
89
+ Note: the test suite requires a schema with these privileges:
90
+
91
+ - CREATE TABLE
92
+ - CREATE SESSION
93
+ - CREATE PROCEDURE
94
+ - CREATE SEQUENCE
95
+ - CREATE TRIGGER
96
+
94
97
### 1.5 Set NODE_PATH
95
98
96
99
``` bash
@@ -144,4 +147,4 @@ assigned a number. The following number ranges have been chosen:
144
147
145
148
## 4. Test Index
146
149
147
- See ` test/list.txt ` for the list of existing tests.
150
+ See [ ` test/list.txt ` ] ( https://github.com/oracle/node-oracledb/blob/master/test/list.txt ) for the list of existing tests.
0 commit comments