@@ -74,52 +74,71 @@ describe('Config Keys', () => {
7474 databaseAdapter : null ,
7575 databaseOptions : {
7676 appName : 'MyParseApp' ,
77- authMechanism : 'SCRAM-SHA-256' ,
78- authMechanismProperties : { SERVICE_NAME : 'mongodb' } ,
77+
78+ // Cannot be tested as it requires authentication setup
79+ // authMechanism: 'SCRAM-SHA-256',
80+ // authMechanismProperties: { SERVICE_NAME: 'mongodb' },
81+
7982 authSource : 'admin' ,
8083 autoSelectFamily : true ,
8184 autoSelectFamilyAttemptTimeout : 3000 ,
82- compressors : [ 'snappy' , ' zlib'] ,
85+ compressors : [ 'zlib' ] ,
8386 connectTimeoutMS : 5000 ,
8487 directConnection : false ,
8588 disableIndexFieldValidation : true ,
8689 forceServerObjectId : false ,
8790 heartbeatFrequencyMS : 10000 ,
88- loadBalanced : false ,
8991 localThresholdMS : 15 ,
9092 maxConnecting : 2 ,
9193 maxIdleTimeMS : 60000 ,
9294 maxPoolSize : 10 ,
93- maxStalenessSeconds : 10 ,
95+ maxStalenessSeconds : 90 ,
9496 maxTimeMS : 1000 ,
9597 minPoolSize : 5 ,
96- proxyHost : 'proxy.example.com' ,
97- proxyPassword : 'proxypass' ,
98- proxyPort : 1080 ,
99- proxyUsername : 'proxyuser' ,
98+
99+ // Cannot be tested as it requires a proxy setup
100+ // proxyHost: 'proxy.example.com',
101+ // proxyPassword: 'proxypass',
102+ // proxyPort: 1080,
103+ // proxyUsername: 'proxyuser',
104+
100105 readConcernLevel : 'majority' ,
101106 readPreference : 'secondaryPreferred' ,
102107 readPreferenceTags : [ { dc : 'east' } ] ,
103- replicaSet : 'myReplicaSet' ,
108+
109+ // Cannot be tested as it requires a replica set setup
110+ // replicaSet: 'myReplicaSet',
111+
104112 retryReads : true ,
105113 retryWrites : true ,
106114 serverMonitoringMode : 'auto' ,
107115 serverSelectionTimeoutMS : 5000 ,
108116 socketTimeoutMS : 5000 ,
109- srvMaxHosts : 0 ,
110- srvServiceName : 'mongodb' ,
117+
118+ // Cannot be tested as it requires a replica cluster setup
119+ // srvMaxHosts: 0,
120+ // srvServiceName: 'mongodb',
121+
111122 ssl : false ,
112- tls : true ,
123+ tls : false ,
113124 tlsAllowInvalidCertificates : false ,
114125 tlsAllowInvalidHostnames : false ,
115- tlsCAFile : '/path/to/ca .pem',
116- tlsCertificateKeyFile : '/path/to /cert.pem',
126+ tlsCAFile : __dirname + '/support/cert/cert .pem',
127+ tlsCertificateKeyFile : __dirname + '/support/cert /cert.pem',
117128 tlsCertificateKeyFilePassword : 'password' ,
118- tlsInsecure : false ,
119129 waitQueueTimeoutMS : 5000 ,
120130 zlibCompressionLevel : 6 ,
121131 } ,
122132 } ) ) . toBeResolved ( ) ;
133+ await expectAsync ( reconfigureServer ( {
134+ databaseURI : 'mongodb://localhost:27017/parse' ,
135+ filesAdapter : null ,
136+ databaseAdapter : null ,
137+ databaseOptions : {
138+ // The following option needs to be tested separately due to driver config rules
139+ tlsInsecure : false ,
140+ } ,
141+ } ) ) . toBeResolved ( ) ;
123142 expect ( loggerErrorSpy . calls . all ( ) . reduce ( ( s , call ) => s += call . args [ 0 ] , '' ) ) . not . toMatch ( invalidKeyErrorMessage ) ;
124143 } ) ;
125144} ) ;
0 commit comments