Skip to content

Commit

Permalink
Merge branch 'main' of github.com:mongodb-js/mongosh into gagik/e2e-f…
Browse files Browse the repository at this point in the history
…oliage
  • Loading branch information
gagik committed Dec 16, 2024
2 parents c6548c7 + 7c26c7a commit 208c92c
Show file tree
Hide file tree
Showing 10 changed files with 60 additions and 68 deletions.
2 changes: 1 addition & 1 deletion THIRD_PARTY_NOTICES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
The following third-party software is used by and included in **mongosh**.
This document was automatically generated on Sun Dec 15 2024.
This document was automatically generated on Mon Dec 16 2024.

## List of dependencies

Expand Down
6 changes: 3 additions & 3 deletions packages/e2e-tests/test/e2e-auth.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -998,7 +998,7 @@ describe('Auth e2e', function () {
],
});
if (
(await preTestShell.waitForExit()) === 1 &&
(await preTestShell.waitForAnyExit()) === 1 &&
preTestShell.output.match(
/digital envelope routines::unsupported|SSL routines::library has no ciphers/
)
Expand All @@ -1022,7 +1022,7 @@ describe('Auth e2e', function () {
'SCRAM-SHA-1',
],
});
await shell.waitForExit();
await shell.waitForAnyExit();
try {
shell.assertContainsOutput(
'Auth mechanism SCRAM-SHA-1 is not supported in FIPS mode'
Expand Down Expand Up @@ -1109,7 +1109,7 @@ describe('Auth e2e', function () {
'GSSAPI',
],
});
await shell.waitForExit();
await shell.waitForAnyExit();
// Failing to auth with kerberos fails with different error messages on each OS.
// Sometimes in CI, it also fails because the server received kerberos
// credentials, most likely because of a successful login by another
Expand Down
2 changes: 1 addition & 1 deletion packages/e2e-tests/test/e2e-direct.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ describe('e2e direct connection', function () {
const shell = this.startTestShell({
args: ['--host', hostlist, 'admin'],
});
await shell.waitForExit();
await shell.waitForAnyExit();
shell.assertContainsOutput('MongoServerSelectionError');
});

Expand Down
10 changes: 5 additions & 5 deletions packages/e2e-tests/test/e2e-oidc.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ describe('OIDC auth e2e', function () {
'--browser=false',
],
});
await shell.waitForExit();
await shell.waitForAnyExit();
shell.assertContainsOutput(
'Consider specifying --oidcFlows=auth-code,device-auth if you are running mongosh in an environment without browser access'
);
Expand Down Expand Up @@ -405,7 +405,7 @@ describe('OIDC auth e2e', function () {
MONGOSH_E2E_TEST_CURL_ALLOW_INVALID_TLS: '1',
},
});
await shell.waitForExit();
await shell.waitForAnyExit();
// We cannot make the mongod server accept the mock IdP's certificate,
// so the best we can verify here is that auth failed *on the server*
shell.assertContainsOutput(/MongoServerError: Authentication failed/);
Expand Down Expand Up @@ -435,7 +435,7 @@ describe('OIDC auth e2e', function () {
},
});

await shell.waitForExit();
await shell.waitForAnyExit();
// We cannot make the mongod server accept the mock IdP's certificate,
// so the best we can verify here is that auth failed *on the server*
shell.assertContainsOutput(/MongoServerError: Authentication failed/);
Expand Down Expand Up @@ -499,7 +499,7 @@ describe('OIDC auth e2e', function () {
'--eval=42',
],
});
await shell.waitForExit();
await shell.waitForSuccessfulExit();

shell.assertContainsOutput('BEGIN OIDC TOKEN DUMP');
shell.assertContainsOutput('"tokenType": "Bearer"');
Expand All @@ -519,7 +519,7 @@ describe('OIDC auth e2e', function () {
'--eval=42',
],
});
await shell.waitForExit();
await shell.waitForSuccessfulExit();

shell.assertContainsOutput('BEGIN OIDC TOKEN DUMP');
shell.assertContainsOutput('"tokenType": "Bearer"');
Expand Down
4 changes: 2 additions & 2 deletions packages/e2e-tests/test/e2e-proxy.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ describe('e2e proxy support', function () {
},
});

const code = await shell.waitForExit();
const code = await shell.waitForAnyExit();
expect(code).to.equal(1);
});

Expand Down Expand Up @@ -622,7 +622,7 @@ describe('e2e proxy support', function () {
},
});

await shell.waitForExit();
await shell.waitForAnyExit();
// We cannot make the mongod server accept the mock IdP's certificate,
// so the best we can verify here is that auth failed *on the server*
shell.assertContainsOutput(/MongoServerError: Authentication failed/);
Expand Down
2 changes: 1 addition & 1 deletion packages/e2e-tests/test/e2e-snippet.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ describe('snippet integration tests', function () {
'config.set("snippetIndexSourceURLs", "http://localhost:1/")'
);
shell.writeInputLine('exit');
await shell.waitForExit();
await shell.waitForSuccessfulExit();

shell = makeTestShell();
await shell.waitForPrompt();
Expand Down
8 changes: 4 additions & 4 deletions packages/e2e-tests/test/e2e-tls.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ describe('e2e TLS', function () {
});
await shell.waitForPrompt();
await shell.executeLine('db.shutdownServer({ force: true })');
shell.kill();
await shell.waitForExit();
shell.writeInputLine('exit');
await shell.waitForAnyExit(); // closing the server may lead to an error being displayed
});

const server = startTestServer('e2e-tls-no-cli-valid-srv', {
Expand Down Expand Up @@ -399,8 +399,8 @@ describe('e2e TLS', function () {
});
await shell.waitForPrompt();
await shell.executeLine('db.shutdownServer({ force: true })');
shell.kill();
await shell.waitForExit();
shell.writeInputLine('exit');
await shell.waitForAnyExit(); // closing the server may lead to an error being displayed
});

const server = startTestServer('e2e-tls-valid-cli-valid-srv', {
Expand Down
Loading

0 comments on commit 208c92c

Please sign in to comment.