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

Add createCollection and collMod spec tests for changeStreamPreAndPostImages option

    • Needed
    • Hide

      Drivers should sync their collection management spec tests to this commit. Drivers with createCollection and modifyCollection helpers should add a changeStreamPreAndPostImages option that is a document passed in the create or collMod command respectively.
      Update: serverless: forbid was added in this commit

      Show
      Drivers should sync their collection management spec tests to this commit . Drivers with createCollection and modifyCollection helpers should add a changeStreamPreAndPostImages option that is a document passed in the create or collMod command respectively. Update: serverless: forbid was added in this commit
    • $i18n.getText("admin.common.words.hide")
      Key Status/Resolution FixVersion
      CDRIVER-4368 Fixed 1.22.0, 1.22.0-beta0
      CXX-2499 Fixed 3.7.0
      CSHARP-4152 Done 2.16.0
      GODRIVER-2396 Done 1.10.0, 1.10.0-beta1
      JAVA-4592 Fixed 4.7.0
      NODE-4210 Done 4.7.0
      MOTOR-948 Duplicate
      PYTHON-3239 Duplicate
      PHPLIB-856 Fixed 1.13.0-beta1, 1.13.0
      RUBY-2971 Fixed 2.18.0
      RUST-1295 Fixed 2.4.0
      SWIFT-1555 Duplicate
      SWIFT-1472 Won't Do
      $i18n.getText("admin.common.words.show")
      #scriptField, #scriptField *{ border: 1px solid black; } #scriptField{ border-collapse: collapse; } #scriptField td { text-align: center; /* Center-align text in table cells */ } #scriptField td.key { text-align: left; /* Left-align text in the Key column */ } #scriptField a { text-decoration: none; /* Remove underlines from links */ border: none; /* Remove border from links */ } /* Add green background color to cells with FixVersion */ #scriptField td.hasFixVersion { background-color: #00FF00; /* Green color code */ } /* Center-align the first row headers */ #scriptField th { text-align: center; } Key Status/Resolution FixVersion CDRIVER-4368 Fixed 1.22.0, 1.22.0-beta0 CXX-2499 Fixed 3.7.0 CSHARP-4152 Done 2.16.0 GODRIVER-2396 Done 1.10.0, 1.10.0-beta1 JAVA-4592 Fixed 4.7.0 NODE-4210 Done 4.7.0 MOTOR-948 Duplicate PYTHON-3239 Duplicate PHPLIB-856 Fixed 1.13.0-beta1, 1.13.0 RUBY-2971 Fixed 2.18.0 RUST-1295 Fixed 2.4.0 SWIFT-1555 Duplicate SWIFT-1472 Won't Do

      Summary

      Downstream changes for DRIVERS-1915 mentioned that the create and collMod commands now accept a changeStreamPreAndPostImages document option, which is used to enable pre- and post-images. The commit for that issue added unified change stream spec tests with runCommand operations that execute collMod to enable changeStreamPreAndPostImages on the collection under test (originally created by initialData), but did not add any spec tests for createCollection or collMod helpers that may exist in drivers.

      benji.rewis@mongodb.com pointed out that we do have a directory for collection management tests (despite not currently having a collection management spec). We should add unified tests for the changeStreamPreAndPostImages option there. Drivers without helpers can skip them as needed.

      Existing spec tests reference a createCollection database operation. These would be the first tests for a collMod helper, so I'll propose we name that database operation modifyCollection unless anyone objects.

      Additionally, the server team intentionally implemented changeStreamPreAndPostImages as a document (e.g. {enabled: <boolean>}), so I propose drivers do the same instead of simplifying it as a boolean type and possibly locking themselves into an API limitation down the line.

      Motivation

      Is this issue urgent?

      No, but it should be done alongside language tickets for DRIVERS-1915.

      Is this ticket required by a downstream team?

      No.

      Is this ticket only for tests?

      Yes.

            Assignee:
            benji.rewis@mongodb.com Benji Rewis (Inactive)
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: