Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-4274

Fix matching logic in the unified test runner

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 4.7.0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • 3
    • Not Needed

      What problem are you facing?

      The `match` functionality, used when asserting that received documents match the expected documents in a unified test, is incorrect.  There are two already identified issues (perhaps more):

      • the `match` function doesn't assert for exact matches on nested documents correctly.  We currently check for exact matches if we are more than 2 levels deep in an object, but the spec calls for exact matching on anything that isn't the root document.
      • our command event matching is currently relying on the match function to assert correctness.  fixing the above will cause the command assertions to work incorrectly, because documents that were previously not strictly compared will be strictly compared.

      Acceptance Criteria

      • Fix the unified runner so that our matching logic is correct.
      • Refactor command event matching to match according to spec.
      • Ensure that all tests pass.

       

      Specs: https://github.com/mongodb/specifications/blob/17fcfb039e66d9962d710a00877e3da9db5bcdac/source/unified-test-format/unified-test-format.rst

            Assignee:
            bailey.pearson@mongodb.com Bailey Pearson
            Reporter:
            bailey.pearson@mongodb.com Bailey Pearson
            Daria Pardue
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: