diff options
author | Benety Goh <benety@mongodb.com> | 2021-01-14 21:12:59 -0500 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-01-15 03:28:47 +0000 |
commit | b38b3f70467a38daad975330023d3d1f44a81e97 (patch) | |
tree | a82285a21b475e0eb06b22ada0babddc888ea4c2 | |
parent | 86baa27a51948649d1cdf8e75a5824f66ee55465 (diff) | |
download | mongo-b38b3f70467a38daad975330023d3d1f44a81e97.tar.gz |
SERVER-53336 listCollections returns 'timeseries' as type for timeseries collections
-rw-r--r-- | jstests/noPassthroughWithMongod/timeseries_create.js | 2 | ||||
-rw-r--r-- | src/mongo/db/commands/list_collections.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/jstests/noPassthroughWithMongod/timeseries_create.js b/jstests/noPassthroughWithMongod/timeseries_create.js index ba24ffb7ef1..cd3b46bb4a1 100644 --- a/jstests/noPassthroughWithMongod/timeseries_create.js +++ b/jstests/noPassthroughWithMongod/timeseries_create.js @@ -43,7 +43,7 @@ const testOptions = function(allowed, const collections = assert.commandWorked(testDB.runCommand({listCollections: 1, nameOnly: true})) .cursor.firstBatch; - assert.contains({name: collName, type: "time-series"}, collections); + assert.contains({name: collName, type: "timeseries"}, collections); assert.contains({name: bucketsCollName, type: "collection"}, collections); assert.commandFailedWithCode(testDB.runCommand({drop: bucketsCollName}), diff --git a/src/mongo/db/commands/list_collections.cpp b/src/mongo/db/commands/list_collections.cpp index 7b488dd33c3..b279fe997b7 100644 --- a/src/mongo/db/commands/list_collections.cpp +++ b/src/mongo/db/commands/list_collections.cpp @@ -144,7 +144,7 @@ void _addWorkingSetMember(OperationContext* opCtx, BSONObj buildViewBson(const ViewDefinition& view, bool nameOnly) { BSONObjBuilder b; b.append("name", view.name().coll()); - b.append("type", view.timeseries() ? "time-series" : "view"); + b.append("type", view.timeseries() ? "timeseries" : "view"); if (nameOnly) { return b.obj(); |