import {runEncryptedTest} from "jstests/fle2/libs/encrypted_client_util.js";
|
|
const st = new ShardingTest({mongos: 1, shards: 2, rs: {nodes: 1}});
|
|
const dbName = jsTestName();
|
const db = st.s.getDB(jsTestName());
|
const collName = 'encrypted';
|
|
const sampleEncryptedFields = {
|
fields: [
|
{path: "first", bsonType: "string", queries: {"queryType": "equality", contention: 0}},
|
{path: "ssn", bsonType: "string", queries: {"queryType": "equality", contention: 0}},
|
]
|
};
|
|
runEncryptedTest(db, dbName, collName, sampleEncryptedFields, (edb, client) => {
|
assert.commandWorked(edb.runCommand({createUnsplittableCollection: "coll"}));
|
// assert.commandWorked(edb.createCollection("coll")); //< This works fine
|
assert.commandFailedWithCode(edb.coll.cleanup(), 6346807);
|
});
|
|
st.stop();
|