Add a negative soda metaData test
This commit is contained in:
parent
80bb1aa0e4
commit
e8214df2d4
|
@ -4175,6 +4175,7 @@ Overview of node-oracledb functional tests
|
|||
164.9 get multiple documents
|
||||
164.10 create index
|
||||
164.11 the examples/soda1.js case
|
||||
164.12 Negative: create collection with invalid metaData value
|
||||
|
||||
165. soda2.js
|
||||
165.1 create two sodaDatabase objects which point to the same instance
|
||||
|
|
|
@ -476,4 +476,32 @@ describe('164. soda1.js', () => {
|
|||
}
|
||||
}); // 164.11
|
||||
|
||||
it('164.12 Negative: create collection with invalid metaData value', async () => {
|
||||
let conn;
|
||||
try {
|
||||
conn = await oracledb.getConnection(dbconfig);
|
||||
let sd = conn.getSodaDatabase();
|
||||
|
||||
let t_collname = "soda_test_164_5";
|
||||
let options = { metaData: "metaData" };
|
||||
let coll = await sd.createCollection(t_collname, options);
|
||||
should.not.exist(coll);
|
||||
|
||||
} catch(err) {
|
||||
should.exist(err);
|
||||
should.strictEqual(
|
||||
err.message,
|
||||
'NJS-006: invalid type for parameter 3'
|
||||
);
|
||||
} finally {
|
||||
if (conn) {
|
||||
try {
|
||||
await conn.close();
|
||||
} catch(err) {
|
||||
should.not.exist(err);
|
||||
}
|
||||
}
|
||||
}
|
||||
}); // 164.12
|
||||
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue