mirror of
https://github.com/mongodb/mongo.git
synced 2024-11-24 00:17:37 +01:00
771dabd098
GitOrigin-RevId: 744aa110a53786b23c62ff53f87a1418b5991e8d
23 lines
464 B
JavaScript
23 lines
464 B
JavaScript
/*
|
|
* Ensure options object passed to ShardingTest is not mutated.
|
|
*/
|
|
|
|
import {ShardingTest} from "jstests/libs/shardingtest.js";
|
|
|
|
const opts = {
|
|
setParameter: {},
|
|
};
|
|
|
|
try {
|
|
const st = new ShardingTest({
|
|
mongos: [opts],
|
|
config: [opts],
|
|
rs: {nodes: [opts]},
|
|
shards: 1,
|
|
});
|
|
st.stop();
|
|
} catch (e) {
|
|
assert(false, `ShardingTest threw an error: ${tojson(e)}`);
|
|
} finally {
|
|
assert.eq(opts, {setParameter: {}});
|
|
} |