File tree Expand file tree Collapse file tree 2 files changed +29
-0
lines changed
Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -4175,6 +4175,7 @@ Overview of node-oracledb functional tests
41754175 164.9 get multiple documents
41764176 164.10 create index
41774177 164.11 the examples/soda1.js case
4178+ 164.12 Negative: create collection with invalid metaData value
41784179
41794180165. soda2.js
41804181 165.1 create two sodaDatabase objects which point to the same instance
Original file line number Diff line number Diff line change @@ -476,4 +476,32 @@ describe('164. soda1.js', () => {
476476 }
477477 } ) ; // 164.11
478478
479+ it ( '164.12 Negative: create collection with invalid metaData value' , async ( ) => {
480+ let conn ;
481+ try {
482+ conn = await oracledb . getConnection ( dbconfig ) ;
483+ let sd = conn . getSodaDatabase ( ) ;
484+
485+ let t_collname = "soda_test_164_5" ;
486+ let options = { metaData : "metaData" } ;
487+ let coll = await sd . createCollection ( t_collname , options ) ;
488+ should . not . exist ( coll ) ;
489+
490+ } catch ( err ) {
491+ should . exist ( err ) ;
492+ should . strictEqual (
493+ err . message ,
494+ 'NJS-006: invalid type for parameter 3'
495+ ) ;
496+ } finally {
497+ if ( conn ) {
498+ try {
499+ await conn . close ( ) ;
500+ } catch ( err ) {
501+ should . not . exist ( err ) ;
502+ }
503+ }
504+ }
505+ } ) ; // 164.12
506+
479507} ) ;
You can’t perform that action at this time.
0 commit comments