Skip to content

Commit

Permalink
fix: set param only for server 8+
Browse files Browse the repository at this point in the history
  • Loading branch information
alenakhineika committed May 23, 2024
1 parent 5559204 commit 2a21fa4
Showing 1 changed file with 16 additions and 13 deletions.
29 changes: 16 additions & 13 deletions packages/compass-e2e-tests/tests/oidc.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,19 +109,22 @@ describe('OIDC integration', function () {
authNamePrefix: 'dev',
};

cluster = await startTestServer({
args: [
'--setParameter',
'authenticationMechanisms=SCRAM-SHA-256,MONGODB-OIDC',
// enableTestCommands allows using http:// issuers such as http://localhost
'--setParameter',
'enableTestCommands=true',
'--setParameter',
`oidcIdentityProviders=${JSON.stringify([serverOidcConfig])}`,
'--setParameter',
'JWKSMinimumQuiescePeriodSecs=0',
],
});
const args = [
'--setParameter',
'authenticationMechanisms=SCRAM-SHA-256,MONGODB-OIDC',
// enableTestCommands allows using http:// issuers such as http://localhost
'--setParameter',
'enableTestCommands=true',
'--setParameter',
`oidcIdentityProviders=${JSON.stringify([serverOidcConfig])}`,
];

if (serverSatisfies('>= 8.0.0-alpha0', true)) {
// Disable quiescing of JWKSet fetches to match the pre-8.0 behavior.
args.push('--setParameter', 'JWKSMinimumQuiescePeriodSecs=0');
}

cluster = await startTestServer({ args });

const cs = new ConnectionString(cluster.connectionString);
cs.searchParams.set('authMechanism', 'MONGODB-OIDC');
Expand Down

0 comments on commit 2a21fa4

Please sign in to comment.