summaryrefslogtreecommitdiff
path: root/jstests/noPassthrough/timeseries_create.js
diff options
context:
space:
mode:
authorLouis Williams <louis.williams@mongodb.com>2021-06-15 10:51:02 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-06-15 15:27:26 +0000
commitaeaf49f3560bc11475d2b57848e50961e6df5789 (patch)
tree6807d93d30f8ba3e1d4a4e17d66be2f3c3601518 /jstests/noPassthrough/timeseries_create.js
parentb3f9a51989261ed7f52bc5460bcb1a0dbdd62b0c (diff)
downloadmongo-aeaf49f3560bc11475d2b57848e50961e6df5789.tar.gz
SERVER-55664 EphemeralForTest supports clustered _id indexes
Diffstat (limited to 'jstests/noPassthrough/timeseries_create.js')
-rw-r--r--jstests/noPassthrough/timeseries_create.js27
1 files changed, 6 insertions, 21 deletions
diff --git a/jstests/noPassthrough/timeseries_create.js b/jstests/noPassthrough/timeseries_create.js
index 182e8efba5f..3a74bff2fb7 100644
--- a/jstests/noPassthrough/timeseries_create.js
+++ b/jstests/noPassthrough/timeseries_create.js
@@ -54,22 +54,11 @@ const testOptions = function(allowed,
const bucketsColl = collections.find(coll => coll.name == bucketsCollName);
assert(bucketsColl, collections);
assert.eq(bucketsColl.type, "collection", bucketsColl);
- if (TimeseriesTest.supportsClusteredIndexes(conn)) {
- assert(bucketsColl.options.clusteredIndex, bucketsColl);
- }
+ assert(bucketsColl.options.clusteredIndex, bucketsColl);
if (createOptions.expireAfterSeconds) {
- if (TimeseriesTest.supportsClusteredIndexes(conn)) {
- assert.eq(bucketsColl.options.expireAfterSeconds,
- createOptions.expireAfterSeconds,
- bucketsColl);
- } else {
- assert.docEq(testDB[collName].getIndexes(), [{
- v: 2,
- key: {time: 1},
- name: 'control.min.time_1',
- expireAfterSeconds: createOptions.expireAfterSeconds.valueOf(),
- }]);
- }
+ assert.eq(bucketsColl.options.expireAfterSeconds,
+ createOptions.expireAfterSeconds,
+ bucketsColl);
}
assert.commandWorked(testDB.runCommand({drop: collName, writeConcern: {w: "majority"}}));
@@ -153,13 +142,9 @@ testCompatibleCreateOptions({collation: {locale: "ja"}});
testCompatibleCreateOptions({writeConcern: {}});
testCompatibleCreateOptions({comment: ""});
-const errorCodeForInvalidExpireAfterSecondsValue = TimeseriesTest.supportsClusteredIndexes(conn)
- ? ErrorCodes.InvalidOptions
- : ErrorCodes.CannotCreateIndex;
-testIncompatibleCreateOptions({expireAfterSeconds: NumberLong(-10)},
- errorCodeForInvalidExpireAfterSecondsValue);
+testIncompatibleCreateOptions({expireAfterSeconds: NumberLong(-10)}, ErrorCodes.InvalidOptions);
testIncompatibleCreateOptions({expireAfterSeconds: NumberLong("4611686018427387904")},
- errorCodeForInvalidExpireAfterSecondsValue);
+ ErrorCodes.InvalidOptions);
testIncompatibleCreateOptions({expireAfterSeconds: ""}, ErrorCodes.TypeMismatch);
testIncompatibleCreateOptions({capped: true, size: 100});
testIncompatibleCreateOptions({capped: true, max: 100});