diff options
author | Louis Williams <louis.williams@mongodb.com> | 2021-03-18 10:29:23 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-03-18 15:30:03 +0000 |
commit | ce5cb5c681dbf954d229367f543c0b89a4cbc6d7 (patch) | |
tree | 78a11245454dc3e20364974c37da425e27a7b60f /jstests | |
parent | 75ed5c985cdd4161c4d2c672037798d9085b303e (diff) | |
download | mongo-ce5cb5c681dbf954d229367f543c0b89a4cbc6d7.tar.gz |
SERVER-55104 Report time-series bucket granularity
Diffstat (limited to 'jstests')
-rw-r--r-- | jstests/noPassthroughWithMongod/timeseries_create.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/jstests/noPassthroughWithMongod/timeseries_create.js b/jstests/noPassthroughWithMongod/timeseries_create.js index fabe63f87b9..6ff50d9df40 100644 --- a/jstests/noPassthroughWithMongod/timeseries_create.js +++ b/jstests/noPassthroughWithMongod/timeseries_create.js @@ -100,6 +100,9 @@ testValidTimeseriesOptions({timeField: "time", metaField: "meta"}); testValidTimeseriesOptions({timeField: "time", expireAfterSeconds: NumberLong(100)}); testValidTimeseriesOptions( {timeField: "time", metaField: "meta", expireAfterSeconds: NumberLong(100)}); +testValidTimeseriesOptions({timeField: "time", metaField: "meta", granularity: "seconds"}); +testValidTimeseriesOptions( + {timeField: "time", metaField: "meta", granularity: "seconds", bucketMaxSpanSeconds: 3600}); testInvalidTimeseriesOptions("", ErrorCodes.TypeMismatch); testInvalidTimeseriesOptions({timeField: 100}, ErrorCodes.TypeMismatch); @@ -114,6 +117,10 @@ testInvalidTimeseriesOptions({timeField: "time", invalidOption: {}}, 40415); testInvalidTimeseriesOptions({timeField: "sub.time"}, ErrorCodes.InvalidOptions); testInvalidTimeseriesOptions({timeField: "time", metaField: "sub.meta"}, ErrorCodes.InvalidOptions); testInvalidTimeseriesOptions({timeField: "time", metaField: "time"}, ErrorCodes.InvalidOptions); +testInvalidTimeseriesOptions({timeField: "time", metaField: "meta", granularity: "minutes"}, + ErrorCodes.InvalidOptions); +testInvalidTimeseriesOptions({timeField: "time", metaField: "meta", bucketMaxSpanSeconds: 10}, + ErrorCodes.InvalidOptions); testCompatibleCreateOptions({storageEngine: {}}); testCompatibleCreateOptions({indexOptionDefaults: {}}); |