Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-47798

Audit isMaster response validation for mongod and mongos

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.0.19, 3.6.19, 4.2.8, 4.4.0-rc6, 4.7.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • v4.4, v4.2, v4.0, v3.6
    • Repl 2020-05-18

      This came out of the conversation in SERVER-47750. We should have tests that validate the fields of isMaster responses to ensure that the server is returning the correct types.

      For mongod, this may already be covered in our unittests and the nature of using setter functions (which would throw compiler errors if we passed an incorrect type as a parameter).

      Mongos' isMaster responses fields are set directly on the response object, and we don't seem to have any test coverage for validating the types returned.

      Ideally, we would use the IDL for isMaster responses, but until then, it might make sense to add an integration test verifying that isMaster responses are returning the types that the drivers expect.

            Assignee:
            pavithra.vetriselvan@mongodb.com Pavithra Vetriselvan
            Reporter:
            pavithra.vetriselvan@mongodb.com Pavithra Vetriselvan
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: