Uploaded image for project: 'Drivers'
  1. Drivers
  2. DRIVERS-2109

Add tests to Index Management spec

    XMLWordPrintable

Details

    • Spec Change
    • Status: Backlog
    • Major - P3
    • Resolution: Unresolved
    • Index Management
    • None
    • Needed

    Description

      The Index management specification does not include any prose or YAML/JSON tests. We should consider adding some.

      An important part of these tests would be to check that all the options for createIndexes are accepted by the server. As of MongoDB 3.4, the server validates those options (see SERVER-769). This was not the case when the spec was written.

      Testing the options behavior is particularly important because the server's createIndexes command does not align with many of the option names in the spec. For example:

      • version in driver = v on server
      • defaultLanguage in driver = default_language on server
      • languageOverride in driver = language_override on server
      • until SPEC-1111, the spec contained an expireAfter option corresponding to expireAfterSeconds on the server (now renamed to match.)

      This is an easy place for errors to be introduced in drivers like Swift that use a BSONEncoder to convert options types to documents, where keys are automatically named by the property names (see SWIFT-404.)

      SPEC-1111 pointed out (and fixed) that storageEngine is supposed to be a document, not a string. A spec test case including the storageEngine option would easily catch this.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              kaitlin.mahar@mongodb.com Kaitlin Mahar
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: