Repository navigation
feat: implemented getParameter command - #267
jmarkerink wants to merge 1 commit into
Conversation
bdeca9c to
4508c1a
Compare
| boolean getAllParameters = "*".equals(value); | ||
| boolean showDetails = false; | ||
| if (value instanceof Document options) { | ||
| getAllParameters = Utils.isTrue(options.get("allParameters")); |
There was a problem hiding this comment.
Upstream MongoDB rejects non-boolean values with a TypeMismatch error
There was a problem hiding this comment.
thanks, will revise it
| boolean showDetails = false; | ||
| if (value instanceof Document options) { | ||
| getAllParameters = Utils.isTrue(options.get("allParameters")); | ||
| showDetails = Utils.isTrue(options.get("showDetails")); |
There was a problem hiding this comment.
…same here: boolean type is required, otherwise TypeMismatch
There was a problem hiding this comment.
.. will revise this too
315bf26 to
8c4e08b
Compare
| @Test | ||
| void testGetAllParameters() { | ||
| Document allParameters = runCommand(json("getParameter: {allParameters: true, showDetails: true}")); | ||
| assertThat(allParameters.getDouble("ok")).isEqualTo(1.0); |
There was a problem hiding this comment.
can use do a containsOnlyKeys(…) here as well?
There was a problem hiding this comment.
Like we did with the hello command, or can we make a difference in this case between the real and memory backend?
I would opt to use containsKeys since the real mongo gives way more parms.
| void testGetAllParameters() { | ||
| Document allParameters = runCommand(json("getParameter: {allParameters: true, showDetails: true}")); | ||
| assertThat(allParameters.getDouble("ok")).isEqualTo(1.0); | ||
| assertThat(allParameters.get("featureCompatibilityVersion")) |
There was a problem hiding this comment.
wouldn’t it be simpler and cleaner to write multiple .containsEntry(…)?
c17cdc3 to
5bba1b2
Compare
No description provided.