summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenety Goh <benety@mongodb.com>2021-01-14 21:12:59 -0500
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-01-15 03:28:47 +0000
commitb38b3f70467a38daad975330023d3d1f44a81e97 (patch)
treea82285a21b475e0eb06b22ada0babddc888ea4c2
parent86baa27a51948649d1cdf8e75a5824f66ee55465 (diff)
downloadmongo-b38b3f70467a38daad975330023d3d1f44a81e97.tar.gz
SERVER-53336 listCollections returns 'timeseries' as type for timeseries collections
-rw-r--r--jstests/noPassthroughWithMongod/timeseries_create.js2
-rw-r--r--src/mongo/db/commands/list_collections.cpp2
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();