From 1ad4fe35f8093e803e0b9a4762f4a701e7216229 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Mon, 7 Jun 2021 11:27:40 +0200 Subject: [PATCH 1/2] fix(shell-api): mark collection.reIndex as standalone-only MONGOSH-813 --- packages/shell-api/src/collection.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/shell-api/src/collection.ts b/packages/shell-api/src/collection.ts index be56d969bc..bf55ce72b3 100644 --- a/packages/shell-api/src/collection.ts +++ b/packages/shell-api/src/collection.ts @@ -1193,6 +1193,7 @@ export default class Collection extends ShellApiWithMongoClass { * @return {Promise} */ @returnsPromise + @topologies([Topologies.Standalone]) async reIndex(): Promise { this._emitCollectionApiCall('reIndex'); return await this._mongo._serviceProvider.runCommandWithCheck(this._database._name, { From 39951d25a8ae6c014286560d2addc22db9ad3baf Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Mon, 7 Jun 2021 19:19:58 +0200 Subject: [PATCH 2/2] fixup: autocomplete suite --- packages/autocomplete/index.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/autocomplete/index.spec.ts b/packages/autocomplete/index.spec.ts index 3630dfe8f0..127c954942 100644 --- a/packages/autocomplete/index.spec.ts +++ b/packages/autocomplete/index.spec.ts @@ -230,7 +230,7 @@ describe('completer.completer', () => { it('returns all suggestions', async() => { const i = 'db.shipwrecks.'; const collComplete = Object.keys(shellSignatures.Collection.attributes as any); - const adjusted = collComplete.filter(c => !['count', 'update', 'remove', 'insert', 'save', 'findAndModify'].includes(c)).map(c => `${i}${c}`); + const adjusted = collComplete.filter(c => !['count', 'update', 'remove', 'insert', 'save', 'findAndModify', 'reIndex'].includes(c)).map(c => `${i}${c}`); expect(await completer(sharded440, i)).to.deep.equal([adjusted, i]); });