File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change
1
+ 'use strict' ;
2
+
3
+ const withClient = require ( './shared' ) . withClient ;
4
+ const setupDatabase = require ( './shared' ) . setupDatabase ;
5
+ const expect = require ( 'chai' ) . expect ;
6
+ const TopologyType = require ( '../../lib/sdam/common' ) . TopologyType ;
7
+
8
+ describe ( 'Sharding (Connection)' , function ( ) {
9
+ before ( function ( ) {
10
+ return setupDatabase ( this . configuration ) ;
11
+ } ) ;
12
+
13
+ it ( 'Should use sharded topology' , {
14
+ metadata : { requires : { topology : 'sharded' } } ,
15
+ test : function ( ) {
16
+ const client = this . configuration . newClient ( { } ) ;
17
+ return withClient ( client , ( client , done ) => {
18
+ expect ( client ) . to . exist ;
19
+ expect ( client ) . nested . property ( 'topology.description.type' ) . to . equal ( TopologyType . Sharded ) ;
20
+ return done ( ) ;
21
+ } ) ( ) ;
22
+ }
23
+ } ) ;
24
+ } ) ;
You can’t perform that action at this time.
0 commit comments