diff --git a/packages/cli-repl/src/mongosh-repl.spec.ts b/packages/cli-repl/src/mongosh-repl.spec.ts index 0df89c472..7f356ac27 100644 --- a/packages/cli-repl/src/mongosh-repl.spec.ts +++ b/packages/cli-repl/src/mongosh-repl.spec.ts @@ -1309,4 +1309,28 @@ describe('MongoshNodeRepl', function () { expect(output).to.not.match(/Using MongoDB/); }); }); + + context('with is_stream: true', function () { + beforeEach(async function () { + sp.getConnectionInfo.resolves({ + extraInfo: { + uri: 'mongodb://localhost:27017/test', + is_localhost: true, + is_stream: true, + }, + buildInfo: { + version: '4.4.1', + }, + }); + mongoshReplOptions.shellCliOptions = { + nodb: false, + }; + mongoshRepl = new MongoshNodeRepl(mongoshReplOptions); + await mongoshRepl.initialize(serviceProvider); + }); + + it('shows Atlas Stream Processing', function () { + expect(output).to.match(/Using MongoDB:\t\tAtlas Stream Processing/); + }); + }); }); diff --git a/packages/cli-repl/src/mongosh-repl.ts b/packages/cli-repl/src/mongosh-repl.ts index 38517c597..d094098c4 100644 --- a/packages/cli-repl/src/mongosh-repl.ts +++ b/packages/cli-repl/src/mongosh-repl.ts @@ -173,7 +173,10 @@ class MongoshNodeRepl implements EvaluationListener { instanceState.setEvaluationListener(this); await instanceState.fetchConnectionInfo(); - let mongodVersion = instanceState.connectionInfo.buildInfo?.version; + const { buildInfo, extraInfo } = instanceState.connectionInfo; + let mongodVersion = extraInfo?.is_stream + ? 'Atlas Stream Processing' + : buildInfo?.version; const apiVersion = serviceProvider.getRawClient()?.serverApi?.version; if (apiVersion) { mongodVersion =