Test and Copyright year updates

This commit is contained in:
Sharad Chandran R 2024-01-29 18:51:10 +05:30
parent 55e4fc9be0
commit 1ef9380083
8 changed files with 43 additions and 12 deletions

View File

@ -1,4 +1,4 @@
Copyright (c) 2015, 2023 Oracle and/or its affiliates.
Copyright (c) 2015, 2024 Oracle and/or its affiliates.
This software is dual-licensed to you under the Universal Permissive License
(UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl and Apache License

View File

@ -1 +1 @@
Copyright (c) 2015, 2023, Oracle and/or its affiliates.
Copyright (c) 2015, 2024, Oracle and/or its affiliates.

View File

@ -50,7 +50,7 @@ vulnerability disclosure process.
## License
Copyright (c) 2015, 2023, Oracle and/or its affiliates.
Copyright (c) 2015, 2024, Oracle and/or its affiliates.
This software is dual-licensed to you under the Universal Permissive License
(UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl and Apache License

View File

@ -1,6 +1,6 @@
# node-oracledb Documentation for the Oracle Database Node.js Add-on
*Copyright (c) 2015, 2023, Oracle and/or its affiliates.*
*Copyright (c) 2015, 2024, Oracle and/or its affiliates.*
This software is dual-licensed to you under the Universal Permissive License
(UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl and Apache License

View File

@ -34,7 +34,7 @@ root_doc = master_doc = 'index'
# General substitutions.
project = 'node-oracledb'
copyright = u'2015, 2023, Oracle and/or its affiliates'
copyright = u'2015, 2024, Oracle and/or its affiliates'
author = 'Oracle'
# The default replacements for |version| and |release|, also used in various

View File

@ -10,7 +10,7 @@ License
.. centered:: **LICENSE AGREEMENT FOR node-oracledb**
Copyright |copy| 2015, 2023 Oracle and/or its affiliates.
Copyright |copy| 2015, 2024 Oracle and/or its affiliates.
This software is dual-licensed to you under the Universal Permissive License
(UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl and Apache License

View File

@ -5629,3 +5629,5 @@ oracledb.OUT_FORMAT_OBJECT and resultSet = true
293. plsqlWarnings.js
293.1 Warning on executing PL/SQL procedure
293.2 Warning from PL/SQL query on a non-existing table
293.3 Warning from function in a PLSQL query
293.4 with poolMin=0 with password in grace time with heterogeneous pool

View File

@ -36,8 +36,16 @@ const oracledb = require('oracledb');
const dbConfig = require('./dbconfig.js');
const assert = require('assert');
describe('293. plsqlWarnings.js', function() {
let conn;
before(async function() {
conn = await oracledb.getConnection(dbConfig);
});
after(async function() {
await conn.close();
});
it('293.1 Warning on executing PL/SQL procedure', async () => {
const plsql = `
CREATE OR REPLACE PROCEDURE GETDATEPROC(OUTTIME OUT TIMESTAMP) AS
@ -46,13 +54,11 @@ describe('293. plsqlWarnings.js', function() {
END;
`;
const conn = await oracledb.getConnection(dbConfig);
const result = await conn.execute(plsql);
assert.strictEqual(result.warning.message.startsWith("NJS-700:"), true);
// cleanup
await conn.execute(`DROP PROCEDURE GETDATEPROC`);
await conn.close();
}); // 293.1
// GH issue #823: https://github.com/oracle/node-oracledb/issues/823
@ -65,13 +71,36 @@ describe('293. plsqlWarnings.js', function() {
end;
`;
const conn = await oracledb.getConnection(dbConfig);
const result = await conn.execute(plsql);
assert.strictEqual(result.warning.message.startsWith("NJS-700:"), true);
// cleanup
await conn.execute(`DROP PROCEDURE test293_2`);
await conn.close();
}); // 293.2
it('293.3 Warning from function in a PLSQL query', async () => {
const plsql = `
create or replace function test293_3 (x in number)
return varchar2(25)
as
f varchar2(25);
begin
f := 'This is a test';
return f;
end test293_3;
`;
const result = await conn.execute(plsql);
assert.strictEqual(result.warning.message.startsWith("NJS-700"), true);
// cleanup
await conn.execute(`DROP function test293_3`);
}); // 293.3
it('293.4 with poolMin=0 with password in grace time with heterogeneous pool', async function() {
const result = await conn.execute(`create or replace procedure selempty(empName in VARCHAR2) AS
BEGIN
select * from emp where ename = empName;
end;`);
assert.strictEqual(result.warning.code.startsWith("NJS-700"), true);
}); // 293.4
});