summaryrefslogtreecommitdiff
path: root/jstests/noPassthrough/configExpand_exec_values.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/noPassthrough/configExpand_exec_values.js')
-rw-r--r--jstests/noPassthrough/configExpand_exec_values.js28
1 files changed, 28 insertions, 0 deletions
diff --git a/jstests/noPassthrough/configExpand_exec_values.js b/jstests/noPassthrough/configExpand_exec_values.js
new file mode 100644
index 00000000000..21b9e493ea1
--- /dev/null
+++ b/jstests/noPassthrough/configExpand_exec_values.js
@@ -0,0 +1,28 @@
+// Test config file expansion using EXEC.
+
+(function() {
+ 'use strict';
+
+ load('jstests/noPassthrough/libs/configExpand/lib.js');
+
+ // Basic success case
+ configExpandSuccess(
+ {
+ setParameter: {
+ scramIterationCount: {__exec: makeReflectionCmd('12345')},
+ scramSHA256IterationCount:
+ {__exec: makeReflectionCmd("23456\n"), type: 'string', trim: 'whitespace'}
+ }
+ },
+ function(admin) {
+ const response = assert.commandWorked(admin.runCommand(
+ {getParameter: 1, scramIterationCount: 1, scramSHA256IterationCount: 1}));
+ assert.eq(response.scramIterationCount,
+ 12345,
+ "Incorrect derived config value for scramIterationCount");
+ assert.eq(response.scramSHA256IterationCount,
+ 23456,
+ "Incorrect derived config value scramSHA256IterationCount");
+ });
+
+})();