-
Type: Bug
-
Resolution: Won't Fix
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Testing Infrastructure
-
Server Tooling & Methods
-
ALL
The MongoRunner test helpers take a "configuration object" rather than an array, which means for example that you cannot test passing the same command line option twice.
This line here, in the function that does the option conversion:
https://github.com/mongodb/mongo/blob/r2.7.1/src/mongo/shell/servers.js#L280
seems to be in place to test for the array case. However, we fall into the typical javascript trap where typeof an
array is "object", so it doesn't work at all:
https://github.com/mongodb/mongo/blob/r2.7.1/src/mongo/shell/types.js#L660
We should either delete this code or fix "isObject" so that it returns the correct thing. As it is now, this is effectively dead and misleading code. As part of this we need to decide whether MongoRunner should support arrays for configuration or not.