mongo/jstests/client_encrypt/fle_command_line_encryption.js
Zac 591928c619 SERVER-108478 JS formatted by prettier and remove clang-format (#39656)
GitOrigin-RevId: 6c8f6aded47f260aa4f7c231b17dae3302cb1e04
2025-08-21 17:27:09 +00:00

40 lines
878 B
JavaScript

/*
* This file tests an encrypted shell started using command line parameters.
*/
import {CA_CERT, CLIENT_CERT, SERVER_CERT} from "jstests/ssl/libs/ssl_helpers.js";
const x509_options = {
sslMode: "requireSSL",
sslPEMKeyFile: SERVER_CERT,
sslCAFile: CA_CERT,
};
const conn = MongoRunner.runMongod(x509_options);
const shellOpts = [
"mongo",
"--host",
conn.host,
"--port",
conn.port,
"--tls",
"--sslPEMKeyFile",
CLIENT_CERT,
"--sslCAFile",
CA_CERT,
"--tlsAllowInvalidHostnames",
"--awsAccessKeyId",
"access",
"--awsSecretAccessKey",
"secret",
"--keyVaultNamespace",
"test.coll",
"--kmsURL",
"https://localhost:8000",
];
const testFiles = ["jstests/client_encrypt/lib/fle_command_line_explicit_encryption.js"];
for (const file of testFiles) {
runMongoProgram(...shellOpts, file);
}