@@ -67,25 +67,57 @@ describe('Config Keys', () => {
6767 expect ( loggerErrorSpy . calls . all ( ) . reduce ( ( s , call ) => s += call . args [ 0 ] , '' ) ) . not . toMatch ( invalidKeyErrorMessage ) ;
6868 } ) ;
6969
70- it_only_db ( 'mongo' ) ( 'recognizes valid keys in databaseOptions (MongoDB)' , async ( ) => {
70+ fit_only_db ( 'mongo' ) ( 'recognizes valid keys in databaseOptions (MongoDB)' , async ( ) => {
7171 await expectAsync ( reconfigureServer ( {
7272 databaseURI : 'mongodb://localhost:27017/parse' ,
7373 filesAdapter : null ,
7474 databaseAdapter : null ,
7575 databaseOptions : {
76- retryWrites : true ,
77- maxTimeMS : 1000 ,
78- maxStalenessSeconds : 10 ,
76+ appName : 'MyParseApp' ,
77+ authMechanism : 'SCRAM-SHA-256' ,
78+ authMechanismProperties : { SERVICE_NAME : 'mongodb' } ,
79+ authSource : 'admin' ,
80+ autoSelectFamily : true ,
81+ autoSelectFamilyAttemptTimeout : 3000 ,
82+ compressors : [ 'snappy' , 'zlib' ] ,
83+ connectTimeoutMS : 5000 ,
84+ directConnection : false ,
85+ disableIndexFieldValidation : true ,
86+ forceServerObjectId : false ,
87+ heartbeatFrequencyMS : 10000 ,
88+ loadBalanced : false ,
89+ localThresholdMS : 15 ,
90+ maxConnecting : 2 ,
91+ maxIdleTimeMS : 60000 ,
7992 maxPoolSize : 10 ,
93+ maxStalenessSeconds : 10 ,
94+ maxTimeMS : 1000 ,
8095 minPoolSize : 5 ,
96+ proxyHost : 'proxy.example.com' ,
97+ proxyPassword : 'proxypass' ,
98+ proxyPort : 1080 ,
99+ proxyUsername : 'proxyuser' ,
100+ readConcernLevel : 'majority' ,
101+ readPreference : 'secondaryPreferred' ,
102+ readPreferenceTags : [ { dc : 'east' } ] ,
103+ replicaSet : 'myReplicaSet' ,
104+ retryReads : true ,
105+ retryWrites : true ,
106+ serverMonitoringMode : 'auto' ,
81107 serverSelectionTimeoutMS : 5000 ,
82- maxIdleTimeMS : 60000 ,
83- heartbeatFrequencyMS : 10000 ,
84- connectTimeoutMS : 5000 ,
85108 socketTimeoutMS : 5000 ,
86- autoSelectFamily : true ,
87- autoSelectFamilyAttemptTimeout : 3000 ,
88- disableIndexFieldValidation : true
109+ srvMaxHosts : 0 ,
110+ srvServiceName : 'mongodb' ,
111+ ssl : false ,
112+ tls : true ,
113+ tlsAllowInvalidCertificates : false ,
114+ tlsAllowInvalidHostnames : false ,
115+ tlsCAFile : '/path/to/ca.pem' ,
116+ tlsCertificateKeyFile : '/path/to/cert.pem' ,
117+ tlsCertificateKeyFilePassword : 'password' ,
118+ tlsInsecure : false ,
119+ waitQueueTimeoutMS : 5000 ,
120+ zlibCompressionLevel : 6 ,
89121 } ,
90122 } ) ) . toBeResolved ( ) ;
91123 expect ( loggerErrorSpy . calls . all ( ) . reduce ( ( s , call ) => s += call . args [ 0 ] , '' ) ) . not . toMatch ( invalidKeyErrorMessage ) ;
0 commit comments