Skip to content

Commit 37d527e

Browse files
authored
chore(cli-repl): add a non-FLE db interaction smoke test (#882)
Since we now (at least temporarily) have a platform without FLE support in our CLI, we should add a smoke test that does also test db interactivity but does not require FLE specifically.
1 parent bd2093f commit 37d527e

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

packages/cli-repl/src/smoke-tests.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,17 @@ export async function runSmokeTests(smokeTestServer: string | undefined, executa
1919
output: /Hello World!/,
2020
testArgs: ['--nodb'],
2121
}].concat(smokeTestServer ? [{
22+
input: `
23+
const dbname = "testdb_simplesmoke" + new Date().getTime();
24+
use(dbname);
25+
db.testcoll.insertOne({ d: new Date() });
26+
if (Object.keys(EJSON.serialize(db.testcoll.findOne()).d)[0] === '$date') {
27+
print('Test succeeded');
28+
}
29+
db.dropDatabase();`,
30+
output: /Test succeeded/,
31+
testArgs: [smokeTestServer as string]
32+
}, {
2233
input: fleSmokeTestScript,
2334
output: /Test succeeded|Test skipped/,
2435
testArgs: [smokeTestServer as string]

0 commit comments

Comments
 (0)